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

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

Issue 23886004: Update dart:io tests to use asyncStart/asyncEnd (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 3 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
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 "package:expect/expect.dart";
6 import 'dart:async'; 5 import 'dart:async';
7 import 'dart:convert'; 6 import 'dart:convert';
8 import 'dart:io'; 7 import 'dart:io';
9 import 'dart:isolate'; 8
9 import "package:async_helper/async_helper.dart";
10 import "package:expect/expect.dart";
10 11
11 void testZLibInflate_regress10026() { 12 void testZLibInflate_regress10026() {
12 test(data, expect) { 13 test(data, expect) {
13 var port = new ReceivePort(); 14 asyncStart();
14 var controller = new StreamController(sync: true); 15 var controller = new StreamController(sync: true);
15 controller.stream 16 controller.stream
16 .transform(ZLIB.decoder) 17 .transform(ZLIB.decoder)
17 .transform(UTF8.decoder) 18 .transform(UTF8.decoder)
18 .fold(new StringBuffer(), (buffer, s) { 19 .fold(new StringBuffer(), (buffer, s) {
19 buffer.write(s); 20 buffer.write(s);
20 return buffer; 21 return buffer;
21 }) 22 })
22 .then((out) { 23 .then((out) {
23 Expect.equals(out.toString(), expect); 24 Expect.equals(out.toString(), expect);
24 port.close(); 25 asyncEnd();
25 }); 26 });
26 controller.add(data); 27 controller.add(data);
27 controller.close(); 28 controller.close();
28 } 29 }
29 // Generated by using 'gzip -c | od -v -tu1 -An -w12' and adding commas. 30 // Generated by using 'gzip -c | od -v -tu1 -An -w12' and adding commas.
30 test([ 31 test([
31 31, 139, 8, 8, 238, 42, 167, 81, 0, 3, 116, 101, 32 31, 139, 8, 8, 238, 42, 167, 81, 0, 3, 116, 101,
32 120, 116, 46, 116, 120, 116, 0, 125, 84, 79, 175, 147, 33 120, 116, 46, 116, 120, 116, 0, 125, 84, 79, 175, 147,
33 64, 16, 63, 183, 159, 98, 196, 139, 38, 165, 244, 249, 34 64, 16, 63, 183, 159, 98, 196, 139, 38, 165, 244, 249,
34 212, 52, 20, 136, 70, 77, 188, 168, 7, 189, 120, 156, 35 212, 52, 20, 136, 70, 77, 188, 168, 7, 189, 120, 156,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 </div> 132 </div>
132 </body> 133 </body>
133 </html> 134 </html>
134 '''); 135 ''');
135 } 136 }
136 137
137 void main() { 138 void main() {
138 testZLibInflate_regress10026(); 139 testZLibInflate_regress10026();
139 } 140 }
140 141
OLDNEW
« no previous file with comments | « tests/standalone/io/raw_socket_typed_data_test.dart ('k') | tests/standalone/io/regress_7191_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698