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

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

Issue 1322973007: Use memory compiler in compiler_helper.dart. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update cf. comments. Created 5 years, 3 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
« no previous file with comments | « tests/compiler/dart2js/space_test.dart ('k') | tests/compiler/dart2js/type_test_helper.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 12 matching lines...) Expand all
23 ''', 23 ''',
24 }; 24 };
25 25
26 main() { 26 main() {
27 asyncTest(() async { 27 asyncTest(() async {
28 var result = await runCompiler( 28 var result = await runCompiler(
29 memorySourceFiles: MEMORY_SOURCE_FILES, 29 memorySourceFiles: MEMORY_SOURCE_FILES,
30 options: ['--trust-type-annotations']); 30 options: ['--trust-type-annotations']);
31 var compiler = result.compiler; 31 var compiler = result.compiler;
32 var element = compiler.mainFunction; 32 var element = compiler.mainFunction;
33 var code = compiler.backend.assembleCode(element); 33 var code = compiler.backend.getGeneratedCode(element);
34 Expect.isTrue(code.contains('+'), code); 34 Expect.isTrue(code.contains('+'), code);
35 }); 35 });
36 } 36 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/space_test.dart ('k') | tests/compiler/dart2js/type_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698