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 library dev_compiler.test.dependency_graph_test; | 5 library dev_compiler.test.dependency_graph_test; |
6 | 6 |
7 import 'package:analyzer/file_system/file_system.dart'; | 7 import 'package:analyzer/file_system/file_system.dart'; |
8 import 'package:analyzer/file_system/memory_file_system.dart'; | 8 import 'package:analyzer/file_system/memory_file_system.dart'; |
9 import 'package:analyzer/src/generated/source.dart'; | 9 import 'package:analyzer/src/generated/source.dart'; |
10 import 'package:path/path.dart' as path; | 10 import 'package:path/path.dart' as path; |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 } | 732 } |
733 | 733 |
734 setUp(() { | 734 setUp(() { |
735 results = []; | 735 results = []; |
736 }); | 736 }); |
737 | 737 |
738 test('everything build on first run', () { | 738 test('everything build on first run', () { |
739 var node = nodeOf('/index3.html'); | 739 var node = nodeOf('/index3.html'); |
740 rebuild(node, buildNoTransitiveChange); | 740 rebuild(node, buildNoTransitiveChange); |
741 // Note: a6.dart is not included because it built as part of a2.dart | 741 // Note: a6.dart is not included because it built as part of a2.dart |
742 expect(results, ['a3.dart', 'a10.dart', 'a4.dart', 'a5.dart', 'a2.dart'] | 742 expect( |
743 ..addAll(runtimeFilesWithoutPath) | 743 results, |
744 ..add('index3.html')); | 744 ['a3.dart', 'a10.dart', 'a4.dart', 'a5.dart', 'a2.dart'] |
| 745 ..addAll(runtimeFilesWithoutPath) |
| 746 ..add('index3.html')); |
745 | 747 |
746 // Marks are removed automatically by rebuild | 748 // Marks are removed automatically by rebuild |
747 expectGraph( | 749 expectGraph( |
748 node, | 750 node, |
749 ''' | 751 ''' |
750 index3.html | 752 index3.html |
751 |-- a2.dart | 753 |-- a2.dart |
752 | |-- a3.dart | 754 | |-- a3.dart |
753 | |-- a4.dart | 755 | |-- a4.dart |
754 | | |-- a10.dart | 756 | | |-- a10.dart |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 helper(node); | 1242 helper(node); |
1241 return sb.toString(); | 1243 return sb.toString(); |
1242 } | 1244 } |
1243 | 1245 |
1244 final runtimeFilesWithoutPath = defaultRuntimeFiles | 1246 final runtimeFilesWithoutPath = defaultRuntimeFiles |
1245 .map((f) => f.replaceAll('dart/', '')) | 1247 .map((f) => f.replaceAll('dart/', '')) |
1246 .toList(growable: false); | 1248 .toList(growable: false); |
1247 final _RUNTIME_GRAPH = runtimeFilesWithoutPath.map((s) => '|-- $s').join('\n'); | 1249 final _RUNTIME_GRAPH = runtimeFilesWithoutPath.map((s) => '|-- $s').join('\n'); |
1248 final _RUNTIME_GRAPH_REBUILD = | 1250 final _RUNTIME_GRAPH_REBUILD = |
1249 runtimeFilesWithoutPath.map((s) => '|-- $s [needs-rebuild]').join('\n'); | 1251 runtimeFilesWithoutPath.map((s) => '|-- $s [needs-rebuild]').join('\n'); |
OLD | NEW |