| 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 that tree-shaking hasn't been turned off. | 5 // Test that tree-shaking hasn't been turned off. |
| 6 | 6 |
| 7 import 'package:async_helper/async_helper.dart'; | 7 import 'package:async_helper/async_helper.dart'; |
| 8 import 'package:compiler/src/dart2jslib.dart'; | 8 import 'package:compiler/src/compiler.dart'; |
| 9 import 'package:compiler/src/js_backend/js_backend.dart' | 9 import 'package:compiler/src/js_backend/js_backend.dart' |
| 10 show JavaScriptBackend; | 10 show JavaScriptBackend; |
| 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 main() { | 14 main() { |
| 15 DiagnosticCollector collector = new DiagnosticCollector(); | 15 DiagnosticCollector collector = new DiagnosticCollector(); |
| 16 asyncTest(() async { | 16 asyncTest(() async { |
| 17 CompilationResult result = await runCompiler( | 17 CompilationResult result = await runCompiler( |
| 18 memorySourceFiles: MEMORY_SOURCE_FILES, diagnosticHandler: collector); | 18 memorySourceFiles: MEMORY_SOURCE_FILES, diagnosticHandler: collector); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 40 print('Invoked ${MirrorSystem.getName(invocation.memberName)}'); | 40 print('Invoked ${MirrorSystem.getName(invocation.memberName)}'); |
| 41 return reflect('foobar').delegate(invocation); | 41 return reflect('foobar').delegate(invocation); |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 void main() { | 45 void main() { |
| 46 print(new Foo().substring(3)); | 46 print(new Foo().substring(3)); |
| 47 } | 47 } |
| 48 """, | 48 """, |
| 49 }; | 49 }; |
| OLD | NEW |