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

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

Issue 2997413002: Support --use-kernel in memory_compiler (Closed)
Patch Set: Remove hack in source_loader Created 3 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 'dart:async'; 5 import 'dart:async';
6 import 'package:async_helper/async_helper.dart'; 6 import 'package:async_helper/async_helper.dart';
7 import 'compiler_helper.dart'; 7 import 'compiler_helper.dart';
8 8
9 const String TEST_1 = r""" 9 const String TEST_1 = r"""
10 import 'dart:_foreign_helper'; 10 import 'dart:_foreign_helper';
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // exception. 82 // exception.
83 } 83 }
84 """; 84 """;
85 85
86 main() { 86 main() {
87 Future check(String test) { 87 Future check(String test) {
88 var checker = checkerForAbsentPresent(test); 88 var checker = checkerForAbsentPresent(test);
89 Uri uri = new Uri(scheme: 'dart', path: 'test'); 89 Uri uri = new Uri(scheme: 'dart', path: 'test');
90 var compiler = compilerFor(test, uri, expectedErrors: 0); 90 var compiler = compilerFor(test, uri, expectedErrors: 0);
91 return compiler.run(uri).then((_) { 91 return compiler.run(uri).then((_) {
92 var element = findElement(compiler, 'main'); 92 MemberElement element = findElement(compiler, 'main');
93 var backend = compiler.backend; 93 var backend = compiler.backend;
94 String generated = backend.getGeneratedCode(element); 94 String generated = backend.getGeneratedCode(element);
95 checker(generated); 95 checker(generated);
96 }); 96 });
97 } 97 }
98 98
99 asyncTest(() => Future.wait([ 99 asyncTest(() => Future.wait([
100 check(TEST_1), 100 check(TEST_1),
101 check(TEST_2), 101 check(TEST_2),
102 check(TEST_3), 102 check(TEST_3),
103 check(TEST_4), 103 check(TEST_4),
104 check(TEST_5), 104 check(TEST_5),
105 ])); 105 ]));
106 } 106 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/js_constant_test.dart ('k') | tests/compiler/dart2js/kernel/assert_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698