OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
7 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
8 | 8 |
9 class Tracer { | 9 class Tracer { |
10 final String expected; | 10 final String expected; |
11 final String name; | 11 final String name; |
12 String _trace = ""; | 12 String _trace = ""; |
13 int counter = 0; | 13 int counter = 0; |
14 | 14 |
15 Tracer(this.expected, [this.name]); | 15 Tracer(this.expected, [this.name]); |
16 | 16 |
17 void trace(msg) { | 17 void trace(msg) { |
18 if (name != null) { | 18 if (name != null) { |
19 print("Tracing $name: $msg"); | 19 // Commented out, see https://github.com/dart-lang/dev_compiler/issues/278 |
| 20 //print("Tracing $name: $msg"); |
20 } | 21 } |
21 _trace += msg; | 22 _trace += msg; |
22 counter++; | 23 counter++; |
23 } | 24 } |
24 | 25 |
25 void done() { | 26 void done() { |
26 Expect.equals(expected, _trace); | 27 Expect.equals(expected, _trace); |
27 } | 28 } |
28 } | 29 } |
29 | 30 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 await runTest(foo1, "abcdYefC", null, true); | 123 await runTest(foo1, "abcdYefC", null, true); |
123 await runTest(foo2, "abcX", "Error", false); | 124 await runTest(foo2, "abcX", "Error", false); |
124 await runTest(foo3, "abcYX", "Error", false); | 125 await runTest(foo3, "abcYX", "Error", false); |
125 await runTest(foo4, "abcdYeYfX", "Error2", false); | 126 await runTest(foo4, "abcdYeYfX", "Error2", false); |
126 } | 127 } |
127 | 128 |
128 | 129 |
129 void main() { | 130 void main() { |
130 asyncTest(test); | 131 asyncTest(test); |
131 } | 132 } |
OLD | NEW |