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

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

Issue 10659037: Issue 3839. Warn when 'dart:io' and 'dart:html' are used in single library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Report Editor specific warning as ErrorSeverity.INFO 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 aaddf2e5d61c88ba52345e3248b655a76a77b45c..cfe3eba98a8cb2e20e24ac7ce75ea88ddfb7c57b 100644
--- a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
+++ b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
@@ -819,6 +819,30 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
}
/**
+ * Libraries "dart:io" and "dart:html" can not be used together in single application.
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=3839
+ */
+ public void test_consoleWebMix() throws Exception {
+ appSource.setContent(
+ APP,
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "#library('application');",
+ "#import('dart:io');",
+ "#import('dart:html');",
+ ""));
+ // do compiled
+ compile();
+ // find expected error
+ boolean found = false;
+ for (DartCompilationError error : errors) {
+ found |= error.getErrorCode() == DartCompilerErrorCode.CONSOLE_WEB_MIX;
+ }
+ assertTrue(found);
+ }
+
+ /**
* <p>
* http://code.google.com/p/dart/issues/detail?id=3531
*/

Powered by Google App Engine
This is Rietveld 408576698