Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: tests/standalone/io/zlib_test.dart

Issue 185773004: Use actual length of dictionary, and not size of a pointer, in zlib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/filter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import "package:async_helper/async_helper.dart"; 8 import "package:async_helper/async_helper.dart";
9 import "package:expect/expect.dart"; 9 import "package:expect/expect.dart";
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 void testZLibDeflateRaw() { 83 void testZLibDeflateRaw() {
84 asyncStart(); 84 asyncStart();
85 var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; 85 var data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
86 var controller = new StreamController(sync: true); 86 var controller = new StreamController(sync: true);
87 controller.stream.transform(new ZLibEncoder(raw: true, level: 6)) 87 controller.stream.transform(new ZLibEncoder(raw: true, level: 6))
88 .fold([], (buffer, data) { 88 .fold([], (buffer, data) {
89 buffer.addAll(data); 89 buffer.addAll(data);
90 return buffer; 90 return buffer;
91 }) 91 })
92 .then((data) { 92 .then((data) {
93 print(data);
94 Expect.listEquals([99, 96, 100, 98, 102, 97, 101, 99, 231, 224, 4, 0], 93 Expect.listEquals([99, 96, 100, 98, 102, 97, 101, 99, 231, 224, 4, 0],
95 data); 94 data);
96 asyncEnd(); 95 asyncEnd();
97 }); 96 });
98 controller.add(data); 97 controller.add(data);
99 controller.close(); 98 controller.close();
100 } 99 }
101 100
102 void testZLibDeflateInvalidLevel() { 101 void testZLibDeflateInvalidLevel() {
103 test2(gzip, level) { 102 test2(gzip, level) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 testZLibDeflateInvalidLevel(); 228 testZLibDeflateInvalidLevel();
230 testZLibInflate(); 229 testZLibInflate();
231 testZLibInflateSync(); 230 testZLibInflateSync();
232 testZlibInflateThrowsWithSmallerWindow(); 231 testZlibInflateThrowsWithSmallerWindow();
233 testZlibInflateWithLargerWindow(); 232 testZlibInflateWithLargerWindow();
234 testZLibDeflateRaw(); 233 testZLibDeflateRaw();
235 testZLibInflateRaw(); 234 testZLibInflateRaw();
236 testZlibWithDictionary(); 235 testZlibWithDictionary();
237 asyncEnd(); 236 asyncEnd();
238 } 237 }
OLDNEW
« no previous file with comments | « runtime/bin/filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698