OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
10 import 'package:compiler/src/dart2jslib.dart'; | 10 import 'package:compiler/src/compiler.dart'; |
11 import 'package:compiler/src/deferred_load.dart'; | 11 import 'package:compiler/src/deferred_load.dart'; |
12 import 'package:expect/expect.dart'; | 12 import 'package:expect/expect.dart'; |
13 import 'memory_compiler.dart'; | 13 import 'memory_compiler.dart'; |
14 | 14 |
15 void main() { | 15 void main() { |
16 asyncTest(() async { | 16 asyncTest(() async { |
17 CompilationResult result = | 17 CompilationResult result = |
18 await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES); | 18 await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES); |
19 Compiler compiler = result.compiler; | 19 Compiler compiler = result.compiler; |
20 | 20 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 142 |
143 bar1() { | 143 bar1() { |
144 return "hello"; | 144 return "hello"; |
145 } | 145 } |
146 | 146 |
147 bar2() { | 147 bar2() { |
148 return 2; | 148 return 2; |
149 } | 149 } |
150 """, | 150 """, |
151 }; | 151 }; |
OLD | NEW |