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 0c2cf53c0c6273f638d2dd2950dde311bd31eee8..1c718283624d7bc2280f773f0ee03c30c792da15 100644 |
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java |
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java |
@@ -3,7 +3,6 @@ |
// BSD-style license that can be found in the LICENSE file. |
package com.google.dart.compiler.resolver; |
-import com.google.common.base.Joiner; |
import com.google.common.collect.Lists; |
import com.google.common.io.CharStreams; |
import com.google.dart.compiler.CompilerTestCase; |
@@ -48,7 +47,6 @@ public class ResolverCompilerTest extends CompilerTestCase { |
public void test_parameters_withFunctionAlias() throws Exception { |
AnalyzeLibraryResult libraryResult = analyzeLibrary( |
- "Test.dart", |
"typedef List<T> TypeAlias<T, U extends List<T>>(List<T> arg, U u);"); |
assertErrors(libraryResult.getCompilationErrors()); |
DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next(); |
@@ -74,10 +72,10 @@ public class ResolverCompilerTest extends CompilerTestCase { |
* This test succeeds if no exceptions are thrown. |
*/ |
public void test_recursiveTypes() throws Exception { |
- analyzeLibrary("test.dart", Joiner.on("\n").join( |
+ analyzeLibrary( |
"class A extends A implements A {}", |
"class B extends C {}", |
- "class C extends B {}")); |
+ "class C extends B {}"); |
} |
/** |
@@ -86,15 +84,13 @@ public class ResolverCompilerTest extends CompilerTestCase { |
*/ |
public void test_resolution_on_class_decls() throws Exception { |
AnalyzeLibraryResult libraryResult = analyzeLibrary( |
- "Test.dart", |
- Joiner.on("\n").join( |
"class A {}", |
"abstract class B<T> {}", |
"class C<T> extends A implements B<T> {}", |
"class D extends C<int> {}", |
"class E implements C<int> {}", |
"class F<T extends A> {}", |
- "class G extends F<C<int>> {}")); |
+ "class G extends F<C<int>> {}"); |
assertErrors(libraryResult.getCompilationErrors()); |
DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next(); |
List<DartNode> nodes = unit.getTopLevelNodes(); |
@@ -194,15 +190,13 @@ public class ResolverCompilerTest extends CompilerTestCase { |
*/ |
public void test_resolveConstructor_implicit() throws Exception { |
AnalyzeLibraryResult libraryResult = analyzeLibrary( |
- "Test.dart", |
- Joiner.on("\n").join( |
- "class F {", |
- "}", |
- "class Test {", |
- " foo() {", |
- " new F();", |
- " }", |
- "}")); |
+ "class F {", |
+ "}", |
+ "class Test {", |
+ " foo() {", |
+ " new F();", |
+ " }", |
+ "}"); |
assertErrors(libraryResult.getCompilationErrors()); |
DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next(); |
DartNewExpression newExpression = findNodeBySource(unit, "new F()"); |
@@ -213,15 +207,13 @@ public class ResolverCompilerTest extends CompilerTestCase { |
public void test_resolveConstructor_noSuchConstructor() throws Exception { |
AnalyzeLibraryResult libraryResult = analyzeLibrary( |
- "Test.dart", |
- Joiner.on("\n").join( |
- "class A {", |
- "}", |
- "class Test {", |
- " foo() {", |
- " new A.foo();", |
- " }", |
- "}")); |
+ "class A {", |
+ "}", |
+ "class Test {", |
+ " foo() {", |
+ " new A.foo();", |
+ " }", |
+ "}"); |
assertErrors( |
libraryResult.getErrors(), |
errEx(ResolverErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR, 5, 11, 3)); |
@@ -233,31 +225,27 @@ public class ResolverCompilerTest extends CompilerTestCase { |
public void test_resolveConstructor_super_implicitDefault() throws Exception { |
AnalyzeLibraryResult libraryResult = analyzeLibrary( |
- "Test.dart", |
- Joiner.on("\n").join( |
- "// filler filler filler filler filler filler filler filler filler filler", |
- "class A {", |
- "}", |
- "class B extends A {", |
- " B() : super() {}", |
- "}", |
- "")); |
+ "// filler filler filler filler filler filler filler filler filler filler", |
+ "class A {", |
+ "}", |
+ "class B extends A {", |
+ " B() : super() {}", |
+ "}", |
+ ""); |
assertErrors(libraryResult.getErrors()); |
} |
public void test_superMethodInvocation_inConstructorInitializer() throws Exception { |
AnalyzeLibraryResult libraryResult = analyzeLibrary( |
- "Test.dart", |
- Joiner.on("\n").join( |
- "// filler filler filler filler filler filler filler filler filler filler", |
- "class A {", |
- " foo() {}", |
- "}", |
- "class B extends A {", |
- " var x;", |
- " B() : x = super.foo() {}", |
- "}", |
- "")); |
+ "// filler filler filler filler filler filler filler filler filler filler", |
+ "class A {", |
+ " foo() {}", |
+ "}", |
+ "class B extends A {", |
+ " var x;", |
+ " B() : x = super.foo() {}", |
+ "}", |
+ ""); |
assertErrors( |
libraryResult.getErrors(), |
errEx(ResolverErrorCode.SUPER_METHOD_INVOCATION_IN_CONSTRUCTOR_INITIALIZER, 7, 13, 11)); |
@@ -286,8 +274,6 @@ public class ResolverCompilerTest extends CompilerTestCase { |
*/ |
public void test_setElement_forName_inDeclarations() throws Exception { |
AnalyzeLibraryResult libraryResult = analyzeLibrary( |
- "Test.dart", |
- Joiner.on("\n").join( |
"// filler filler filler filler filler filler filler filler filler filler", |
"class A<B extends A> {", |
" var a1;", |
@@ -302,7 +288,7 @@ public class ResolverCompilerTest extends CompilerTestCase { |
" h: d(0);", |
"}", |
"typedef i();", |
- "")); |
+ ""); |
assertErrors(libraryResult.getErrors()); |
DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next(); |
// in class A |