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

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

Issue 16125005: Make new StreamController be async by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments Created 7 years, 6 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"; 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(); 13 var controller = new StreamController(sync: true);
14 controller.stream 14 controller.stream
15 .transform(new ZLibInflater()) 15 .transform(new ZLibInflater())
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);
26 controller.close(); 26 controller.close();
27 } 27 }
28 // Generated by using 'gzip -c | od -v -tu1 -An -w12' and adding commas.
28 test([ 29 test([
29 31, 139, 8, 0, 140, 39, 113, 81, 2, 255, 125, 84, 205, 142, 211, 48, 16, 30 31, 139, 8, 8, 238, 42, 167, 81, 0, 3, 116, 101,
30 62, 55, 79, 49, 132, 11, 72, 77, 211, 101, 1, 85, 217, 52, 2, 1, 18, 23, 31 120, 116, 46, 116, 120, 116, 0, 125, 84, 79, 175, 147,
31 224, 0, 23, 142, 211, 120, 210, 142, 54, 177, 131, 237, 164, 173, 16, 239, 32 64, 16, 63, 183, 159, 98, 196, 139, 38, 165, 244, 249,
32 206, 216, 105, 187, 133, 21, 168, 145, 26, 207, 196, 223, 159, 39, 41, 33 212, 52, 20, 136, 70, 77, 188, 168, 7, 189, 120, 156,
33 159, 40, 83, 251, 99, 79, 176, 243, 93, 91, 37, 229, 249, 143, 80, 85, 34 178, 67, 153, 20, 118, 113, 119, 161, 109, 140, 223, 221,
34 201, 172, 244, 236, 91, 170, 62, 28, 176, 235, 91, 130, 247, 166, 67, 214, 35 97, 105, 251, 170, 47, 154, 54, 41, 51, 195, 254, 254,
35 101, 62, 85, 19, 233, 119, 228, 17, 234, 29, 90, 71, 126, 157, 14, 190, 36 49, 52, 123, 162, 76, 233, 79, 29, 65, 237, 219, 166,
36 201, 86, 41, 228, 213, 185, 179, 243, 190, 207, 232, 199, 192, 227, 58, 37 152, 103, 151, 31, 66, 85, 204, 103, 153, 103, 223, 80,
37 125, 103, 180, 39, 237, 179, 192, 150, 66, 61, 173, 214, 169, 167, 131, 38 241, 225, 136, 109, 215, 16, 188, 55, 45, 178, 206, 146,
38 207, 3, 235, 221, 5, 231, 17, 140, 198, 142, 214, 233, 200, 180, 239, 141, 39 169, 59, 151, 121, 75, 30, 161, 172, 209, 58, 242, 121,
39 245, 87, 155, 247, 172, 252, 110, 173, 104, 228, 154, 178, 184, 152, 3, 40 212, 251, 42, 94, 71, 144, 20, 151, 73, 237, 125, 23,
40 107, 246, 140, 109, 230, 106, 108, 105, 125, 115, 194, 113, 254, 40, 6, 2, 41 211, 143, 158, 135, 60, 122, 103, 180, 39, 237, 227, 145,
41 247, 137, 178, 118, 46, 149, 198, 198, 168, 35, 252, 76, 102, 179, 13, 42 45, 130, 114, 170, 242, 200, 211, 209, 39, 35, 235, 230,
42 214, 247, 91, 107, 6, 173, 178, 218, 180, 198, 22, 240, 180, 89, 202, 239, 43 138, 243, 8, 70, 99, 75, 121, 52, 48, 29, 58, 99,
43 197, 157, 52, 59, 180, 91, 214, 5, 44, 195, 162, 71, 165, 88, 111, 79, 44 253, 205, 225, 3, 43, 95, 231, 138, 6, 46, 41, 14,
44 171, 70, 180, 100, 13, 118, 220, 30, 11, 72, 191, 244, 164, 225, 43, 106, 45 197, 2, 88, 179, 103, 108, 98, 87, 98, 67, 249, 221,
45 151, 206, 33, 253, 72, 237, 72, 158, 107, 132, 207, 52, 144, 84, 46, 133, 46 25, 199, 249, 147, 24, 24, 185, 207, 148, 165, 115, 145,
46 57, 188, 181, 162, 113, 14, 78, 30, 205, 28, 89, 110, 2, 86, 50, 251, 149, 47 12, 182, 70, 157, 224, 231, 124, 54, 219, 98, 185, 223,
47 204, 20, 143, 81, 80, 180, 83, 192, 235, 229, 178, 63, 92, 107, 120, 69, 48 89, 211, 107, 21, 151, 166, 49, 54, 133, 167, 213, 74,
48 29, 224, 224, 205, 31, 82, 110, 169, 187, 251, 135, 137, 38, 66, 111, 140, 49 62, 47, 54, 50, 108, 209, 238, 88, 167, 176, 26, 139,
49 85, 100, 51, 139, 138, 7, 87, 192, 77, 124, 94, 216, 176, 104, 89, 223, 50 14, 149, 98, 189, 59, 87, 149, 104, 137, 43, 108, 185,
50 207, 1, 139, 145, 29, 123, 82, 145, 251, 188, 249, 118, 245, 114, 181, 51 57, 165, 16, 125, 233, 72, 195, 87, 212, 46, 90, 64,
51 138, 251, 67, 102, 153, 162, 218, 88, 244, 108, 68, 134, 54, 154, 38, 136, 52 244, 145, 154, 129, 60, 151, 8, 159, 169, 39, 233, 92,
52 55, 29, 41, 70, 120, 214, 225, 33, 187, 22, 253, 124, 202, 245, 28, 240, 53 27, 11, 120, 107, 69, 227, 2, 156, 220, 26, 59, 178,
53 127, 196, 9, 200, 197, 246, 217, 247, 217, 226, 67, 246, 15, 165, 191, 54 92, 109, 36, 206, 95, 243, 153, 226, 33, 200, 9, 102,
54 204, 196, 115, 120, 200, 98, 242, 22, 64, 229, 42, 243, 120, 242, 213, 44, 55 82, 120, 189, 90, 117, 199, 91, 5, 175, 168, 5, 236,
55 41, 243, 105, 168, 147, 50, 72, 146, 25, 23, 198, 48, 25, 187, 155, 71, 56 189, 249, 67, 200, 61, 181, 155, 127, 88, 168, 170, 48,
56 243, 45, 37, 105, 244, 213, 183, 29, 59, 80, 177, 8, 114, 71, 206, 227, 57 49, 86, 145, 141, 45, 42, 238, 93, 10, 119, 225, 126,
57 166, 101, 183, 147, 148, 188, 129, 13, 193, 224, 228, 182, 49, 22, 184, 58 97, 195, 180, 97, 189, 95, 0, 166, 3, 59, 246, 164,
58 109, 7, 231, 67, 54, 35, 1, 77, 112, 78, 70, 81, 118, 215, 67, 39, 179, 59 2, 247, 229, 240, 253, 250, 229, 122, 29, 206, 143, 137,
59 234, 22, 240, 221, 12, 178, 148, 224, 60, 104, 138, 16, 49, 105, 241, 194, 60 197, 138, 74, 99, 209, 179, 17, 25, 218, 104, 154, 32,
60 26, 61, 129, 192, 160, 187, 143, 112, 61, 217, 142, 157, 147, 160, 3, 145, 61 222, 180, 164, 24, 225, 89, 139, 199, 248, 86, 244, 243,
61 176, 128, 191, 150, 162, 47, 20, 114, 112, 90, 1, 251, 32, 47, 0, 227, 62 41, 213, 75, 188, 255, 17, 39, 32, 87, 219, 23, 223,
62 136, 220, 138, 72, 10, 48, 2, 111, 105, 203, 147, 46, 163, 23, 101, 222, 63 23, 139, 15, 201, 63, 180, 254, 50, 19, 158, 194, 67,
63 79, 190, 74, 121, 51, 45, 53, 235, 52, 188, 159, 69, 158, 239, 247, 251, 64 22, 147, 183, 17, 84, 190, 89, 18, 158, 187, 44, 116,
64 5, 163, 198, 133, 177, 219, 124, 34, 113, 185, 235, 169, 150, 25, 77, 171, 65 50, 109, 244, 60, 27, 21, 73, 45, 132, 227, 90, 212,
65 79, 198, 146, 112, 10, 96, 55, 225, 44, 4, 9, 171, 136, 86, 230, 49, 197, 66 119, 143, 150, 91, 90, 50, 232, 138, 111, 53, 59, 80,
66 50, 63, 101, 154, 79, 223, 143, 223, 163, 237, 129, 168, 87, 4, 0, 0], 67 161, 9, 114, 69, 206, 227, 182, 97, 87, 75, 72, 222,
67 '''<!doctype html> 68 192, 150, 160, 119, 114, 89, 25, 11, 220, 52, 189, 243,
69 99, 52, 3, 1, 77, 112, 78, 246, 80, 78, 151, 125,
70 43, 139, 234, 150, 240, 221, 244, 82, 74, 110, 30, 52,
71 5, 136, 16, 180, 88, 97, 141, 158, 64, 96, 208, 237,
72 3, 92, 71, 182, 101, 231, 36, 231, 145, 72, 88, 192,
73 223, 74, 209, 87, 10, 121, 110, 90, 1, 251, 81, 222,
74 8, 140, 3, 114, 35, 34, 105, 132, 17, 120, 75, 59,
75 158, 116, 25, 189, 204, 146, 110, 242, 149, 201, 107, 105,
76 169, 202, 163, 241, 229, 76, 147, 228, 112, 56, 44, 25,
77 53, 46, 141, 221, 37, 19, 137, 75, 92, 71, 165, 44,
78 104, 84, 124, 50, 150, 132, 83, 0, 219, 9, 103, 41,
79 72, 88, 4, 180, 44, 9, 41, 102, 201, 57, 211, 100,
80 250, 243, 248, 13, 215, 32, 235, 247, 84, 4, 0, 0
81 ], '''
82 <!doctype html>
68 <html> 83 <html>
69 <head> 84 <head>
70 <title>Example Domain</title> 85 <title>Example Domain</title>
71 86
72 <meta charset="utf-8" /> 87 <meta charset="utf-8" />
73 <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 88 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
74 <meta name="viewport" content="width=device-width, initial-scale=1" /> 89 <meta name="viewport" content="width=device-width, initial-scale=1" />
75 <style type="text/css"> 90 <style type="text/css">
76 body { 91 body {
77 background-color: #f0f0f2; 92 background-color: #f0f0f2;
78 margin: 0; 93 margin: 0;
79 padding: 0; 94 padding: 0;
80 font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sa ns-serif; 95 font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sa ns-serif;
81 » » 96
82 } 97 }
83 div { 98 div {
84 width: 600px; 99 width: 600px;
85 margin: 5em auto; 100 margin: 5em auto;
86 padding: 3em; 101 padding: 3em;
87 background-color: #fff; 102 background-color: #fff;
88 border-radius: 1em; 103 border-radius: 1em;
89 } 104 }
90 a:link, a:visited { 105 a:link, a:visited {
91 color: #38488f; 106 color: #38488f;
92 text-decoration: none; 107 text-decoration: none;
93 } 108 }
94 @media (max-width: 600px) { 109 @media (max-width: 600px) {
95 body { 110 body {
96 background-color: #fff; 111 background-color: #fff;
97 } 112 }
98 div { 113 div {
99 width: auto; 114 width: auto;
100 margin: 0 auto; 115 margin: 0 auto;
101 border-radius: 0; 116 border-radius: 0;
102 padding: 1em; 117 padding: 1em;
103 } 118 }
104 } 119 }
105 » </style>» 120 » </style>
106 </head> 121 </head>
107 122
108 <body> 123 <body>
109 <div> 124 <div>
110 <h1>Example Domain</h1> 125 <h1>Example Domain</h1>
111 <p>This domain is established to be used for illustrative examples in do cuments. You do not need to 126 <p>This domain is established to be used for illustrative examples in do cuments. You do not need to
112 coordinate or ask for permission to use this domain in examples, and it is not available for 127 coordinate or ask for permission to use this domain in examples, and it is not available for
113 registration.</p> 128 registration.</p>
114 <p><a href="http://www.iana.org/domains/special">More information...</a> </p> 129 <p><a href="http://www.iana.org/domains/special">More information...</a> </p>
115 </div> 130 </div>
116 </body> 131 </body>
117 </html> 132 </html>
118 '''); 133 ''');
119 } 134 }
120 135
121 void main() { 136 void main() {
122 testZLibInflate_regress10026(); 137 testZLibInflate_regress10026();
123 } 138 }
124 139
OLDNEW
« no previous file with comments | « tests/standalone/io/mime_multipart_parser_test.dart ('k') | tests/standalone/io/stdout_stderr_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698