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

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

Issue 14657012: Report CTEC.AMBIGUOUS_EXPORT (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move implementation to ErrorVerifier 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 9422260471a0c2bb40affb4021a0dad7e22d2203..2fc9c9585b180f7a60ec5900d2de8d2447322f5a 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
@@ -20,20 +20,6 @@ import com.google.dart.engine.parser.ParserErrorCode;
import com.google.dart.engine.source.Source;
public class CompileTimeErrorCodeTest extends ResolverTestCase {
- public void fail_ambiguousExport() throws Exception {
- Source source = addSource(createSource(//
- "library L;",
- "export 'lib1.dart';",
- "export 'lib2.dart';"));
- addSource("/lib1.dart", createSource(//
- "class N {}"));
- addSource("/lib2.dart", createSource(//
- "class N {}"));
- resolve(source);
- assertErrors(CompileTimeErrorCode.AMBIGUOUS_EXPORT);
- verify(source);
- }
-
public void fail_compileTimeConstantRaisesException() throws Exception {
Source source = addSource(createSource(//
// TODO Find an expression that would raise an exception
@@ -677,6 +663,18 @@ public class CompileTimeErrorCodeTest extends ResolverTestCase {
verify(source);
}
+ public void test_ambiguousExport() throws Exception {
+ Source source = addSource(createSource(//
+ "library L;",
+ "export 'lib1.dart';",
+ "export 'lib2.dart';"));
+ addSource("/lib1.dart", "class N {}");
+ addSource("/lib2.dart", "class N {}");
+ resolve(source);
+ assertErrors(CompileTimeErrorCode.AMBIGUOUS_EXPORT);
+ verify(source);
+ }
+
public void test_ambiguousImport_as() throws Exception {
Source source = addSource(createSource(//
"import 'lib1.dart';",

Powered by Google App Engine
This is Rietveld 408576698