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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java

Issue 15741017: Issue 8365. Report error when user library imports an internal SDK library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
index 7fbf1acf6a23f2bd4fdae6d19e54e5174f51faaa..b3d3afffb00d0603c113df3cf5d7cbc05de16438 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/CompileTimeErrorCodeTest.java
@@ -1510,6 +1510,22 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_importInternalLibrary() throws Exception {
+ Source source = addSource(createSource(//
+ "import 'dart:_interceptors';"));
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY);
+ verify(source);
+ }
+
+ public void test_importInternalLibrary_collection() throws Exception {
+ Source source = addSource(createSource(//
+ "import 'dart:_collection-dev';"));
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY);
+ verify(source);
+ }
+
public void test_importOfNonLibrary() throws Exception {
Source source = addSource(createSource(//
"library lib;",

Powered by Google App Engine
This is Rietveld 408576698