| 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 import 'package:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
| 6 import "package:async_helper/async_helper.dart"; | 6 import "package:async_helper/async_helper.dart"; |
| 7 import 'memory_compiler.dart'; | 7 import 'memory_compiler.dart'; |
| 8 | 8 |
| 9 const MEMORY_SOURCE_FILES = const { | 9 const MEMORY_SOURCE_FILES = const { |
| 10 'main.dart': ''' | 10 'main.dart': ''' |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 ''', | 22 ''', |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 main() { | 25 main() { |
| 26 asyncTest(() async { | 26 asyncTest(() async { |
| 27 var result = await runCompiler( | 27 var result = await runCompiler( |
| 28 memorySourceFiles: MEMORY_SOURCE_FILES, | 28 memorySourceFiles: MEMORY_SOURCE_FILES, |
| 29 options: ['--enable-checked-mode']); | 29 options: ['--enable-checked-mode']); |
| 30 var compiler = result.compiler; | 30 var compiler = result.compiler; |
| 31 var element = compiler.mainFunction; | 31 var element = compiler.frontendStrategy.elementEnvironment.mainFunction; |
| 32 var code = compiler.backend.getGeneratedCode(element); | 32 var code = compiler.backend.getGeneratedCode(element); |
| 33 Expect.isTrue(code.contains('+'), code); | 33 Expect.isTrue(code.contains('+'), code); |
| 34 }); | 34 }); |
| 35 } | 35 } |
| OLD | NEW |