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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.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/NonErrorResolverTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
index 4428f0f189e7cf232ed217050bc83c9b42bbd798..05be2a3604f722c5102c17f32b654f74ed8880db 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
@@ -16,6 +16,54 @@ package com.google.dart.engine.resolver;
import com.google.dart.engine.source.Source;
public class NonErrorResolverTest extends ResolverTestCase {
+ public void test_ambiguousExport() throws Exception {
+ Source source = addSource(createSource(//
+ "library L;",
+ "export 'lib1.dart';",
+ "export 'lib2.dart';"));
+ addSource("/lib1.dart", "class M {}");
+ addSource("/lib2.dart", "class N {}");
+ resolve(source);
+ assertNoErrors();
+ verify(source);
+ }
+
+ public void test_ambiguousExport_combinators_hide() throws Exception {
+ Source source = addSource(createSource(//
+ "library L;",
+ "export 'lib1.dart';",
+ "export 'lib2.dart' hide B;"));
+ addSource("/lib1.dart", createSource(//
+ "library L1;",
+ "class A {}",
+ "class B {}"));
+ addSource("/lib2.dart", createSource(//
+ "library L2;",
+ "class B {}",
+ "class C {}"));
+ resolve(source);
+ assertNoErrors();
+ verify(source);
+ }
+
+ public void test_ambiguousExport_combinators_show() throws Exception {
+ Source source = addSource(createSource(//
+ "library L;",
+ "export 'lib1.dart';",
+ "export 'lib2.dart' show C;"));
+ addSource("/lib1.dart", createSource(//
+ "library L1;",
+ "class A {}",
+ "class B {}"));
+ addSource("/lib2.dart", createSource(//
+ "library L2;",
+ "class B {}",
+ "class C {}"));
+ resolve(source);
+ assertNoErrors();
+ verify(source);
+ }
+
public void test_argumentDefinitionTestNonParameter_formalParameter() throws Exception {
Source source = addSource(createSource(//
"f(var v) {",

Powered by Google App Engine
This is Rietveld 408576698