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

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

Issue 11088009: Ignore 'dart-ext:' scheme, allow 'native' in such files (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 109aa5f5ff8e7aa6cee06bf607db497b46f3de63..c13c42aa6b028425f360dc6d304a2c40bbbaf9c4 100644
--- a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
+++ b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
@@ -1262,7 +1262,7 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
compile();
ErrorExpectation.assertErrors(errors);
}
-
+
/**
* Investigation of failing "language/ct_const4_test".
*/
@@ -1287,6 +1287,46 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
assertErrors(errors);
}
+ /**
+ * Internals of Dart use "dart-ext:" import scheme, and these libraries are allowed to use
+ * "native". New import syntax.
+ */
+ public void test_useNative_withDartExt_new() throws Exception {
+ appSource.setContent(
+ APP,
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library A;",
+ "import 'dart-ext:test_extension';",
+ "class A {",
+ " static int ifNull(a, b) native 'TestExtension_IfNull';",
+ "}",
+ ""));
+ // do compile, no errors expected
+ compile();
+ assertErrors(errors);
+ }
+
+ /**
+ * Internals of Dart use "dart-ext:" import scheme, and these libraries are allowed to use
+ * "native". Obsolete import syntax.
+ */
+ public void test_useNative_withDartExt_obsolete() throws Exception {
+ appSource.setContent(
+ APP,
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "#library('A');",
+ "#import('dart-ext:test_extension');",
+ "class A {",
+ " static int ifNull(a, b) native 'TestExtension_IfNull';",
+ "}",
+ ""));
+ // do compile, no errors expected
+ compile();
+ assertErrors(errors);
+ }
+
private void assertAppBuilt() {
didWrite(APP, EXTENSION_DEPS);
}

Powered by Google App Engine
This is Rietveld 408576698