Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: tests/compiler/dart2js/use_checks_test.dart

Issue 2936233003: Remove Compiler.mainApp and Compiler.mainFunction (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/type_test_helper.dart ('k') | tests/compiler/dart2js/value_range3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698