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

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

Issue 841653004: Recover from read errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42871 Created 5 years, 11 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 imports when package root has not been set. 5 // Test that the compiler can handle imports when package root has not been set.
6 6
7 library dart2js.test.package_root; 7 library dart2js.test.package_root;
8 8
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import "package:async_helper/async_helper.dart"; 10 import "package:async_helper/async_helper.dart";
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 Compiler compiler = new Compiler(provider, 53 Compiler compiler = new Compiler(provider,
54 outputProvider, 54 outputProvider,
55 diagnosticHandler, 55 diagnosticHandler,
56 libraryRoot, 56 libraryRoot,
57 packageRoot, 57 packageRoot,
58 [], 58 [],
59 {}); 59 {});
60 60
61 asyncTest(() => compiler.run(main).then((_) { 61 asyncTest(() => compiler.run(main).then((_) {
62 Expect.equals(1, errors.length); 62 Expect.equals(1, errors.length);
63 Expect.isTrue( 63 Expect.isTrue(errors[0].contains("Error reading "));
64 errors[0].startsWith(
65 "Can't read 'package:foo/foo.dart' (Error reading "));
66 })); 64 }));
67 } 65 }
68 66
69 void main() { 67 void main() {
70 runCompiler(Uri.parse('memory:main.dart')); 68 runCompiler(Uri.parse('memory:main.dart'));
71 runCompiler(Uri.parse('package:foo/foo.dart')); 69 runCompiler(Uri.parse('package:foo/foo.dart'));
72 } 70 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js/missing_file_test.dart ('k') | dart/tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698