| OLD | NEW |
| 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"; | 5 import "package:expect/expect.dart"; |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 import 'dart:isolate'; | 8 import 'dart:isolate'; |
| 9 | 9 |
| 10 void testZLibInflate_regress10026() { | 10 void testZLibInflate_regress10026() { |
| 11 test(data, expect) { | 11 test(data, expect) { |
| 12 var port = new ReceivePort(); | 12 var port = new ReceivePort(); |
| 13 var controller = new StreamController(sync: true); | 13 var controller = new StreamController(sync: true); |
| 14 controller.stream | 14 controller.stream |
| 15 .transform(new ZLibInflater()) | 15 .transform(ZLIB.decoder) |
| 16 .transform(new StringDecoder()) | 16 .transform(new StringDecoder()) |
| 17 .fold(new StringBuffer(), (buffer, s) { | 17 .fold(new StringBuffer(), (buffer, s) { |
| 18 buffer.write(s); | 18 buffer.write(s); |
| 19 return buffer; | 19 return buffer; |
| 20 }) | 20 }) |
| 21 .then((out) { | 21 .then((out) { |
| 22 Expect.equals(out.toString(), expect); | 22 Expect.equals(out.toString(), expect); |
| 23 port.close(); | 23 port.close(); |
| 24 }); | 24 }); |
| 25 controller.add(data); | 25 controller.add(data); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 </div> | 130 </div> |
| 131 </body> | 131 </body> |
| 132 </html> | 132 </html> |
| 133 '''); | 133 '''); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void main() { | 136 void main() { |
| 137 testZLibInflate_regress10026(); | 137 testZLibInflate_regress10026(); |
| 138 } | 138 } |
| 139 | 139 |
| OLD | NEW |