OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 /// Test of element diff. | 5 /// Test of element diff. |
6 library trydart.diff_test; | 6 library trydart.diff_test; |
7 | 7 |
8 import 'dart:async' show | 8 import 'dart:async' show |
9 Future; | 9 Future; |
10 | 10 |
11 import 'package:expect/expect.dart' show | 11 import 'package:expect/expect.dart' show |
12 Expect; | 12 Expect; |
13 | 13 |
14 import 'package:async_helper/async_helper.dart' show | 14 import 'package:async_helper/async_helper.dart' show |
15 asyncTest; | 15 asyncTest; |
16 | 16 |
17 import 'package:compiler/src/dart2jslib.dart' show | 17 import 'package:compiler/src/dart2jslib.dart' show |
18 Compiler, | 18 Compiler; |
19 Script; | |
20 | 19 |
21 import 'package:compiler/src/io/source_file.dart' show | 20 import 'package:compiler/src/io/source_file.dart' show |
22 StringSourceFile; | 21 StringSourceFile; |
23 | 22 |
24 import 'package:compiler/src/elements/elements.dart' show | 23 import 'package:compiler/src/elements/elements.dart' show |
25 Element, | 24 Element, |
26 LibraryElement; | 25 LibraryElement; |
27 | 26 |
| 27 import 'package:compiler/src/script.dart' show |
| 28 Script; |
| 29 |
28 import 'package:dart2js_incremental/diff.dart' show | 30 import 'package:dart2js_incremental/diff.dart' show |
29 Difference, | 31 Difference, |
30 computeDifference; | 32 computeDifference; |
31 | 33 |
32 import '../../compiler/dart2js/compiler_helper.dart' show | 34 import '../../compiler/dart2js/compiler_helper.dart' show |
33 MockCompiler, | 35 MockCompiler, |
34 compilerFor; | 36 compilerFor; |
35 | 37 |
36 final TEST_DATA = [ | 38 final TEST_DATA = [ |
37 { | 39 { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 expectedBeforeName, elementNameOrNull(difference.before)); | 117 expectedBeforeName, elementNameOrNull(difference.before)); |
116 Expect.stringEquals(expectedAfterName, elementNameOrNull(difference.after)); | 118 Expect.stringEquals(expectedAfterName, elementNameOrNull(difference.after)); |
117 print(difference); | 119 print(difference); |
118 } | 120 } |
119 Expect.isFalse(iterator.moveNext()); | 121 Expect.isFalse(iterator.moveNext()); |
120 } | 122 } |
121 | 123 |
122 void main() { | 124 void main() { |
123 asyncTest(() => Future.forEach(TEST_DATA, testData)); | 125 asyncTest(() => Future.forEach(TEST_DATA, testData)); |
124 } | 126 } |
OLD | NEW |