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 the graph segmentation algorithm used by deferred loading | 5 // Test of the graph segmentation algorithm used by deferred loading |
6 // to determine which elements can be deferred and which libraries | 6 // to determine which elements can be deferred and which libraries |
7 // much be included in the initial download (loaded eagerly). | 7 // much be included in the initial download (loaded eagerly). |
8 | 8 |
9 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
10 import "package:async_helper/async_helper.dart"; | 10 import "package:async_helper/async_helper.dart"; |
11 import 'memory_source_file_helper.dart'; | 11 import 'memory_source_file_helper.dart'; |
12 import "memory_compiler.dart"; | 12 import "memory_compiler.dart"; |
13 | 13 |
14 import 'package:compiler/implementation/dart2jslib.dart' | 14 import 'package:compiler/src/dart2jslib.dart' |
15 as dart2js; | 15 as dart2js; |
16 | 16 |
17 runTest(String mainScript, test) { | 17 runTest(String mainScript, test) { |
18 Compiler compiler = compilerFor(MEMORY_SOURCE_FILES, | 18 Compiler compiler = compilerFor(MEMORY_SOURCE_FILES, |
19 outputProvider: new OutputCollector()); | 19 outputProvider: new OutputCollector()); |
20 asyncTest(() => compiler.run(Uri.parse(mainScript)) | 20 asyncTest(() => compiler.run(Uri.parse(mainScript)) |
21 .then((_) => test(compiler))); | 21 .then((_) => test(compiler))); |
22 } | 22 } |
23 | 23 |
24 lookupLibrary(compiler, name) { | 24 lookupLibrary(compiler, name) { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 library lib5; | 190 library lib5; |
191 | 191 |
192 foo() {} | 192 foo() {} |
193 """, | 193 """, |
194 "lib6.dart": """ | 194 "lib6.dart": """ |
195 library lib6; | 195 library lib6; |
196 | 196 |
197 foo() {} | 197 foo() {} |
198 """, | 198 """, |
199 }; | 199 }; |
OLD | NEW |