| 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 that we do not accidentially leak code from deferred libraries but do | 5 // Test that we do not accidentially leak code from deferred libraries but do |
| 6 // allow inlining of empty functions and from main. | 6 // allow inlining of empty functions and from main. |
| 7 | 7 |
| 8 import 'package:async_helper/async_helper.dart'; | 8 import 'package:async_helper/async_helper.dart'; |
| 9 import 'package:compiler/src/dart2jslib.dart'; | 9 import 'package:compiler/src/compiler.dart'; |
| 10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| 11 import 'memory_compiler.dart'; | 11 import 'memory_compiler.dart'; |
| 12 | 12 |
| 13 void main() { | 13 void main() { |
| 14 asyncTest(() async { | 14 asyncTest(() async { |
| 15 OutputCollector collector = new OutputCollector(); | 15 OutputCollector collector = new OutputCollector(); |
| 16 CompilationResult result = await runCompiler( | 16 CompilationResult result = await runCompiler( |
| 17 memorySourceFiles: MEMORY_SOURCE_FILES, | 17 memorySourceFiles: MEMORY_SOURCE_FILES, |
| 18 outputProvider: collector); | 18 outputProvider: collector); |
| 19 Compiler compiler = result.compiler; | 19 Compiler compiler = result.compiler; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 """, "lib2.dart": """ | 96 """, "lib2.dart": """ |
| 97 import "lib3.dart" as lib3; | 97 import "lib3.dart" as lib3; |
| 98 | 98 |
| 99 test() { | 99 test() { |
| 100 print(lib3.sameContextInline("should be inlined")); | 100 print(lib3.sameContextInline("should be inlined")); |
| 101 } | 101 } |
| 102 """, "lib3.dart": """ | 102 """, "lib3.dart": """ |
| 103 sameContextInline(x) => "inline same context" + x; | 103 sameContextInline(x) => "inline same context" + x; |
| 104 """}; | 104 """}; |
| OLD | NEW |