iarkh | 16c110b | 2021-05-10 21:43:47 +0700 | [diff] [blame] | 1 | // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 | // for details. All rights reserved. Use of this source code is governed by a |
| 3 | // BSD-style license that can be found in the LICENSE file. |
| 4 | |
sgrekhov | bd1a423 | 2021-05-11 12:08:20 +0700 | [diff] [blame] | 5 | /// @assertion |
| 6 | /// ZLibCodec({ |
| 7 | /// int level: ZLibOption.DEFAULT_LEVEL, |
| 8 | /// int windowBits: ZLibOption.DEFAULT_WINDOW_BITS, |
| 9 | /// int memLevel: ZLibOption.DEFAULT_MEM_LEVEL, |
| 10 | /// int strategy: ZLibOption.strategyDefault, |
| 11 | /// List<int> dictionary: null, |
| 12 | /// bool raw: false, |
| 13 | /// bool gzip: false |
| 14 | /// }) |
| 15 | /// @description Checks that this constructor creates a new ZLibCodec object |
| 16 | /// with specified [gzip] parameters. |
| 17 | /// @author ngl@unipro.ru |
| 18 | |
Sergey G. Grekhov | 45dcc9d | 2018-10-08 16:17:23 +0700 | [diff] [blame] | 19 | import "dart:io"; |
| 20 | import "../../../Utils/expect.dart"; |
| 21 | |
| 22 | main() { |
| 23 | ZLibCodec v = new ZLibCodec(gzip: true); |
sgrekhov | ea2d072 | 2020-08-13 12:32:02 +0700 | [diff] [blame] | 24 | Expect.equals(ZLibOption.defaultLevel, v.level); |
| 25 | Expect.equals(ZLibOption.defaultWindowBits, v.windowBits); |
| 26 | Expect.equals(ZLibOption.defaultMemLevel, v.memLevel); |
| 27 | Expect.equals(ZLibOption.strategyDefault, v.strategy); |
Sergey G. Grekhov | 45dcc9d | 2018-10-08 16:17:23 +0700 | [diff] [blame] | 28 | Expect.equals(null, v.dictionary); |
| 29 | Expect.equals(false, v.raw); |
| 30 | Expect.equals(true, v.gzip); |
| 31 | } |