| 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 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 Element, | 24 Element, |
| 25 LibraryElement; | 25 LibraryElement; |
| 26 | 26 |
| 27 import 'package:compiler/src/script.dart' show | 27 import 'package:compiler/src/script.dart' show |
| 28 Script; | 28 Script; |
| 29 | 29 |
| 30 import 'package:dart2js_incremental/diff.dart' show | 30 import 'package:dart2js_incremental/diff.dart' show |
| 31 Difference, | 31 Difference, |
| 32 computeDifference; | 32 computeDifference; |
| 33 | 33 |
| 34 import '../../compiler/dart2js/compiler_helper.dart' show | 34 import '../../compiler/dart2js/mock_compiler.dart' show |
| 35 MockCompiler, | 35 MockCompiler, |
| 36 compilerFor; | 36 compilerFor; |
| 37 | 37 |
| 38 final TEST_DATA = [ | 38 final TEST_DATA = [ |
| 39 { | 39 { |
| 40 'beforeSource': 'main() {}', | 40 'beforeSource': 'main() {}', |
| 41 'afterSource': 'main() { var x; }', | 41 'afterSource': 'main() { var x; }', |
| 42 'expectations': [['main', 'main']], | 42 'expectations': [['main', 'main']], |
| 43 }, | 43 }, |
| 44 { | 44 { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 expectedBeforeName, elementNameOrNull(difference.before)); | 117 expectedBeforeName, elementNameOrNull(difference.before)); |
| 118 Expect.stringEquals(expectedAfterName, elementNameOrNull(difference.after)); | 118 Expect.stringEquals(expectedAfterName, elementNameOrNull(difference.after)); |
| 119 print(difference); | 119 print(difference); |
| 120 } | 120 } |
| 121 Expect.isFalse(iterator.moveNext()); | 121 Expect.isFalse(iterator.moveNext()); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void main() { | 124 void main() { |
| 125 asyncTest(() => Future.forEach(TEST_DATA, testData)); | 125 asyncTest(() => Future.forEach(TEST_DATA, testData)); |
| 126 } | 126 } |
| OLD | NEW |