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

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

Issue 10532100: Issue 3532. Report error if one unit included twice (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 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 a27ba5747a3d0279b8ce29898484419d07fc0a32..2bcd2bdae442e5a70e1bf3649db1a203bbd23420 100644
--- a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
+++ b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
@@ -671,6 +671,28 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
// should not cause exception
assertFalse(source.exists());
}
+ /**
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=3532
+ */
+ public void test_includeSameUnitTwice() throws Exception {
+ appSource.setContent(
+ "A.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ ""));
+ appSource.setContent(
+ APP,
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "#library('application');",
+ "#source('A.dart');",
+ "#source('A.dart');",
+ ""));
+ // do compile, no errors expected
+ compile();
+ assertErrors(errors, errEx(DartCompilerErrorCode.UNIT_WAS_ALREADY_INCLUDED, 4, 1, 18));
+ }
/**
* There was bug that we added <code>null</code> into {@link LibraryUnit#getImports()}. Here trick

Powered by Google App Engine
This is Rietveld 408576698