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

Unified Diff: compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java

Issue 10200005: Issue 2693. Don't add null imports (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks for review comments Created 8 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 side-by-side diff with in-line comments
Download patch
Index: compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
diff --git a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
index 1ed5b92975bb9bcbf64be139ca9725c8b7088fe0..d6bde06bae444d52236e97a7b56676d7b4d69794 100644
--- a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
+++ b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
@@ -669,6 +669,32 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
assertErrors(errors, errEx(DartCompilerErrorCode.MISSING_SOURCE, 3, 1, 27));
}
+ /**
+ * There was bug that we added <code>null</code> into {@link LibraryUnit#getImports()}. Here trick
+ * is that we reference "existing" {@link Source}, which can not be read.
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=2693
+ */
+ public void test_ignoreNullLibrary() throws Exception {
+ appSource.setContent("canNotRead.dart", MemoryLibrarySource.IO_EXCEPTION_CONTENT);
+ appSource.setContent(
+ APP,
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "#library('app');",
+ "#import('canNotRead.dart');",
+ ""));
+ // use same config as Editor - resolve despite of errors
+ config = new DefaultCompilerConfiguration() {
+ @Override
+ public boolean resolveDespiteParseErrors() {
+ return true;
+ }
+ };
+ // Ignore errors, but we should not get exceptions.
+ compile();
+ }
+
private void assertAppBuilt() {
didWrite(APP, EXTENSION_DEPS);
}

Powered by Google App Engine
This is Rietveld 408576698