| Index: compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java b/compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java
|
| index fdcfc44009a00a671791115afff9b5aafbd65561..c2082fad8930f27c3586dcf17ed028c387ac7c69 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java
|
| @@ -218,7 +218,7 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| "}"));
|
| assertErrors(libraryResult.getCompilationErrors());
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| - DartNewExpression newExpression = findNewExpression(unit, "new F()");
|
| + DartNewExpression newExpression = findExpression(unit, "new F()");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertNotNull(constructorElement);
|
| assertEquals("", getElementSource(constructorElement));
|
| @@ -239,7 +239,7 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| libraryResult.getCompilationErrors(),
|
| errEx(ResolverErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR, 5, 9, 5));
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| - DartNewExpression newExpression = findNewExpression(unit, "new A.foo()");
|
| + DartNewExpression newExpression = findExpression(unit, "new A.foo()");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertNull(constructorElement);
|
| }
|
| @@ -295,7 +295,7 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| "}"));
|
| assertErrors(libraryResult.getCompilationErrors());
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I()");
|
| + DartNewExpression newExpression = findExpression(unit, "new I()");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertNotNull(constructorElement);
|
| assertEquals("", getElementSource(constructorElement));
|
| @@ -320,7 +320,7 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| "}"));
|
| assertErrors(libraryResult.getCompilationErrors());
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I()");
|
| + DartNewExpression newExpression = findExpression(unit, "new I()");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertNotNull(constructorElement);
|
| assertEquals("", getElementSource(constructorElement));
|
| @@ -346,7 +346,7 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| "}"));
|
| assertErrors(libraryResult.getCompilationErrors());
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I()");
|
| + DartNewExpression newExpression = findExpression(unit, "new I()");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertEquals(true, getElementSource(constructorElement).contains("F()"));
|
| }
|
| @@ -408,7 +408,7 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| "}"));
|
| assertErrors(libraryResult.getCompilationErrors());
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I(0)");
|
| + DartNewExpression newExpression = findExpression(unit, "new I(0)");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertEquals(true, getElementSource(constructorElement).contains("F(int y)"));
|
| }
|
| @@ -449,7 +449,7 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| // "new I.foo()" - good
|
| {
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I.foo(0)");
|
| + DartNewExpression newExpression = findExpression(unit, "new I.foo(0)");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertEquals(true, getElementSource(constructorElement).contains("F.foo(int y)"));
|
| }
|
| @@ -511,12 +511,12 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| // "new I()" - no such constructor, has other constructors, so no implicit default.
|
| {
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I(0)");
|
| + DartNewExpression newExpression = findExpression(unit, "new I(0)");
|
| assertEquals(null, newExpression.getElement());
|
| }
|
| // "new I.foo()" - would be valid, if not "F implements I", but here invalid
|
| {
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I.foo(0)");
|
| + DartNewExpression newExpression = findExpression(unit, "new I.foo(0)");
|
| assertEquals(null, newExpression.getElement());
|
| }
|
| }
|
| @@ -559,13 +559,13 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| // "new I()"
|
| {
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I(0)");
|
| + DartNewExpression newExpression = findExpression(unit, "new I(0)");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertEquals(true, getElementSource(constructorElement).contains("I(int y)"));
|
| }
|
| // "new I.foo()"
|
| {
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I.foo(0)");
|
| + DartNewExpression newExpression = findExpression(unit, "new I.foo(0)");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertEquals(true, getElementSource(constructorElement).contains("I.foo(int y)"));
|
| }
|
| @@ -617,7 +617,7 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| // "new I.foo()"
|
| {
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I.foo(0)");
|
| + DartNewExpression newExpression = findExpression(unit, "new I.foo(0)");
|
| assertEquals(null, newExpression.getElement());
|
| }
|
| }
|
| @@ -664,7 +664,7 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| // "new I.foo()" - resolved, but we produce error.
|
| {
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I.foo()");
|
| + DartNewExpression newExpression = findExpression(unit, "new I.foo()");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertEquals(true, getElementSource(constructorElement).contains("F.foo()"));
|
| }
|
| @@ -737,19 +737,19 @@ public class ResolverCompilerTest extends CompilerTestCase {
|
| DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
|
| // "new I.foo()" - resolved, but we produce error.
|
| {
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I.foo(0)");
|
| + DartNewExpression newExpression = findExpression(unit, "new I.foo(0)");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertEquals(true, getElementSource(constructorElement).contains("F.foo("));
|
| }
|
| // "new I.bar()" - resolved, but we produce error.
|
| {
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I.bar(0)");
|
| + DartNewExpression newExpression = findExpression(unit, "new I.bar(0)");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertEquals(true, getElementSource(constructorElement).contains("F.bar("));
|
| }
|
| // "new I.baz()" - resolved, but we produce error.
|
| {
|
| - DartNewExpression newExpression = findNewExpression(unit, "new I.baz(0)");
|
| + DartNewExpression newExpression = findExpression(unit, "new I.baz(0)");
|
| ConstructorElement constructorElement = newExpression.getElement();
|
| assertEquals(true, getElementSource(constructorElement).contains("F.baz("));
|
| }
|
|
|