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

Unified Diff: tests/compiler/dart2js/malformed_uri_test.dart

Issue 1131593006: Report malformed URIs in library dependencies (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/warnings.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/malformed_uri_test.dart
diff --git a/tests/compiler/dart2js/import_test.dart b/tests/compiler/dart2js/malformed_uri_test.dart
similarity index 50%
copy from tests/compiler/dart2js/import_test.dart
copy to tests/compiler/dart2js/malformed_uri_test.dart
index aeaa46907f103e9474f15671820e75b5c98aebc4..d51e2dd34b0e9926635ae0330ff71c38b3c573d1 100644
--- a/tests/compiler/dart2js/import_test.dart
+++ b/tests/compiler/dart2js/malformed_uri_test.dart
@@ -1,11 +1,11 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Test that the compiler can handle missing files used in imports, exports,
// part tags or as the main source file.
-library dart2js.test.import;
+library dart2js.test.malformed_uri;
import 'package:expect/expect.dart';
import "package:async_helper/async_helper.dart";
@@ -13,40 +13,20 @@ import 'memory_compiler.dart';
const MEMORY_SOURCE_FILES = const {
'main.dart': '''
+import '../../Udyn[mic ils/expect.dart';
-library main;
-
-import 'dart:thisLibraryShouldNotExist';
-import 'package:thisPackageShouldNotExist/thisPackageShouldNotExist.dart';
-export 'foo.dart';
-
-part 'bar.dart';
-
-main() {
- int i = "";
-}
+main () { print("Hi"); }
''',
};
-testMissingImports() {
+testMalformedUri() {
var collector = new DiagnosticCollector();
var compiler = compilerFor(MEMORY_SOURCE_FILES, diagnosticHandler: collector);
asyncTest(() => compiler.run(Uri.parse('memory:main.dart')).then((_) {
- Expect.equals(4, collector.errors.length);
- Expect.equals(1, collector.warnings.length);
- }));
-}
-
-testMissingMain() {
- var collector = new DiagnosticCollector();
- var compiler = compilerFor({}, diagnosticHandler: collector);
- asyncTest(() => compiler.run(Uri.parse('memory:missing.dart')).then((_) {
Expect.equals(1, collector.errors.length);
- Expect.equals(0, collector.warnings.length);
}));
}
void main() {
- testMissingImports();
- testMissingMain();
-}
+ testMalformedUri();
+}
« no previous file with comments | « pkg/compiler/lib/src/warnings.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698