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

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

Issue 339563002: Remove scanBuiltinLibraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Test that the compiler can handle missing files used in imports, exports, 5 // Test that the compiler can handle missing files used in imports, exports,
6 // part tags or as the main source file. 6 // part tags or as the main source file.
7 7
8 library dart2js.test.import; 8 library dart2js.test.import;
9 9
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
(...skipping 15 matching lines...) Expand all
26 int i = ""; 26 int i = "";
27 } 27 }
28 ''', 28 ''',
29 }; 29 };
30 30
31 testMissingImports() { 31 testMissingImports() {
32 var collector = new DiagnosticCollector(); 32 var collector = new DiagnosticCollector();
33 var compiler = compilerFor(MEMORY_SOURCE_FILES, diagnosticHandler: collector); 33 var compiler = compilerFor(MEMORY_SOURCE_FILES, diagnosticHandler: collector);
34 asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) { 34 asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) {
35 Expect.equals(4, collector.errors.length); 35 Expect.equals(4, collector.errors.length);
36 Expect.equals(1, collector.warnings.length); 36 // TODO(johnniwinther): Expect 1 warning when analysis of programs with load
37 // failures is reenabled.
38 Expect.equals(0, collector.warnings.length);
37 })); 39 }));
38 } 40 }
39 41
40 testMissingMain() { 42 testMissingMain() {
41 var collector = new DiagnosticCollector(); 43 var collector = new DiagnosticCollector();
42 var compiler = compilerFor({}, diagnosticHandler: collector); 44 var compiler = compilerFor({}, diagnosticHandler: collector);
43 asyncTest(() => compiler.run(Uri.parse('memory:missing.dart')).then((_) { 45 asyncTest(() => compiler.run(Uri.parse('memory:missing.dart')).then((_) {
44 Expect.equals(1, collector.errors.length); 46 Expect.equals(1, collector.errors.length);
45 Expect.equals(0, collector.warnings.length); 47 Expect.equals(0, collector.warnings.length);
46 })); 48 }));
47 } 49 }
48 50
49 void main() { 51 void main() {
50 testMissingImports(); 52 testMissingImports();
51 testMissingMain(); 53 testMissingMain();
52 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698