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 accidentally 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/compiler_new.dart'; | 9 import 'package:compiler/compiler_new.dart'; |
10 import 'package:compiler/src/compiler.dart'; | 10 import 'package:compiler/src/compiler.dart'; |
11 import 'package:expect/expect.dart'; | 11 import 'package:expect/expect.dart'; |
12 import 'memory_compiler.dart'; | 12 import 'memory_compiler.dart'; |
13 | 13 |
14 void main() { | 14 void main() { |
15 asyncTest(() async { | 15 asyncTest(() async { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 import "lib3.dart" as lib3; | 102 import "lib3.dart" as lib3; |
103 | 103 |
104 test() { | 104 test() { |
105 print(lib3.sameContextInline("should be inlined")); | 105 print(lib3.sameContextInline("should be inlined")); |
106 } | 106 } |
107 """, | 107 """, |
108 "lib3.dart": """ | 108 "lib3.dart": """ |
109 sameContextInline(x) => "inline same context" + x; | 109 sameContextInline(x) => "inline same context" + x; |
110 """ | 110 """ |
111 }; | 111 }; |
OLD | NEW |