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

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

Issue 2781423003: Start preparing tests to accept binary compiler input. (Closed)
Patch Set: .. Created 3 years, 8 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 'memory_source_file_helper.dart'; 6 import 'memory_source_file_helper.dart';
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 8
9 import 'package:compiler/compiler.dart' show Diagnostic; 9 import 'package:compiler/compiler.dart' show Diagnostic;
10 import 'package:compiler/src/options.dart' show CompilerOptions; 10 import 'package:compiler/src/options.dart' show CompilerOptions;
(...skipping 15 matching lines...) Expand all
26 if (kind == Diagnostic.ERROR) { 26 if (kind == Diagnostic.ERROR) {
27 errorCount++; 27 errorCount++;
28 } else if (kind == Diagnostic.WARNING) { 28 } else if (kind == Diagnostic.WARNING) {
29 warningCount++; 29 warningCount++;
30 } else { 30 } else {
31 throw 'unexpected diagnostic $kind: $message'; 31 throw 'unexpected diagnostic $kind: $message';
32 } 32 }
33 } 33 }
34 34
35 CompilerImpl compiler = new CompilerImpl( 35 CompilerImpl compiler = new CompilerImpl(
36 new LegacyCompilerInput(provider.readStringFromUri), 36 new LegacyCompilerInput(provider.readUtf8BytesFromUri),
37 new LegacyCompilerOutput(), 37 new LegacyCompilerOutput(),
38 new LegacyCompilerDiagnostics(diagnosticHandler), 38 new LegacyCompilerDiagnostics(diagnosticHandler),
39 new CompilerOptions(libraryRoot: libraryRoot, packageRoot: packageRoot)); 39 new CompilerOptions(libraryRoot: libraryRoot, packageRoot: packageRoot));
40 asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) { 40 asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) {
41 Expect.isTrue(compiler.compilationFailed); 41 Expect.isTrue(compiler.compilationFailed);
42 Expect.equals(5, errorCount); 42 Expect.equals(5, errorCount);
43 Expect.equals(1, warningCount); 43 Expect.equals(1, warningCount);
44 })); 44 }));
45 } 45 }
46 46
(...skipping 10 matching lines...) Expand all
57 } 57 }
58 58
59 for ((){}() in []) { 59 for ((){}() in []) {
60 } 60 }
61 61
62 for (1 in []) { 62 for (1 in []) {
63 } 63 }
64 } 64 }
65 """ 65 """
66 }; 66 };
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/use_unused_api.dart ('k') | tests/compiler/dart2js/library_resolution_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698