| 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:unittest/unittest.dart'; | 10 import 'package:test/test.dart'; |
| 11 | 11 |
| 12 import 'package:dev_compiler/src/analysis_context.dart'; | 12 import 'package:dev_compiler/src/analysis_context.dart'; |
| 13 import 'package:dev_compiler/src/options.dart'; | 13 import 'package:dev_compiler/src/options.dart'; |
| 14 import 'package:dev_compiler/src/dependency_graph.dart'; | 14 import 'package:dev_compiler/src/dependency_graph.dart'; |
| 15 import 'package:dev_compiler/src/report.dart'; | 15 import 'package:dev_compiler/src/report.dart'; |
| 16 import 'package:dev_compiler/src/testing.dart'; | 16 import 'package:dev_compiler/src/testing.dart'; |
| 17 import 'package:path/path.dart' as path; | 17 import 'package:path/path.dart' as path; |
| 18 | 18 |
| 19 import 'test_util.dart'; | |
| 20 | |
| 21 void main() { | 19 void main() { |
| 22 configureTest(); | |
| 23 | |
| 24 var options = new CompilerOptions( | 20 var options = new CompilerOptions( |
| 25 runtimeDir: '/dev_compiler_runtime/', useMockSdk: true); | 21 runtimeDir: '/dev_compiler_runtime/', useMockSdk: true); |
| 26 MemoryResourceProvider testResourceProvider; | 22 MemoryResourceProvider testResourceProvider; |
| 27 ResourceUriResolver testUriResolver; | 23 ResourceUriResolver testUriResolver; |
| 28 var context; | 24 var context; |
| 29 var graph; | 25 var graph; |
| 30 | 26 |
| 31 /// Initial values for test files | 27 /// Initial values for test files |
| 32 var testFiles = { | 28 var testFiles = { |
| 33 '/index1.html': ''' | 29 '/index1.html': ''' |
| (...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 helper(node); | 1163 helper(node); |
| 1168 return sb.toString(); | 1164 return sb.toString(); |
| 1169 } | 1165 } |
| 1170 | 1166 |
| 1171 final runtimeFilesWithoutPath = defaultRuntimeFiles | 1167 final runtimeFilesWithoutPath = defaultRuntimeFiles |
| 1172 .map((f) => f.replaceAll('dart/', '')) | 1168 .map((f) => f.replaceAll('dart/', '')) |
| 1173 .toList(growable: false); | 1169 .toList(growable: false); |
| 1174 final _RUNTIME_GRAPH = runtimeFilesWithoutPath.map((s) => '|-- $s').join('\n'); | 1170 final _RUNTIME_GRAPH = runtimeFilesWithoutPath.map((s) => '|-- $s').join('\n'); |
| 1175 final _RUNTIME_GRAPH_REBUILD = | 1171 final _RUNTIME_GRAPH_REBUILD = |
| 1176 runtimeFilesWithoutPath.map((s) => '|-- $s [needs-rebuild]').join('\n'); | 1172 runtimeFilesWithoutPath.map((s) => '|-- $s [needs-rebuild]').join('\n'); |
| OLD | NEW |