| Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| index c2461b72cc58eb897b0b010b845ca803c835189c..7b4860b0abbfb00326664250df27d471f1284454 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -3,9 +3,6 @@
|
| // BSD-style license that can be found in the LICENSE file.
|
| package com.google.dart.compiler.type;
|
|
|
| -import static com.google.dart.compiler.common.ErrorExpectation.assertErrors;
|
| -import static com.google.dart.compiler.common.ErrorExpectation.errEx;
|
| -
|
| import com.google.common.base.Joiner;
|
| import com.google.common.collect.Iterables;
|
| import com.google.common.collect.Lists;
|
| @@ -42,6 +39,9 @@ import com.google.dart.compiler.resolver.NodeElement;
|
| import com.google.dart.compiler.resolver.ResolverErrorCode;
|
| import com.google.dart.compiler.resolver.TypeErrorCode;
|
|
|
| +import static com.google.dart.compiler.common.ErrorExpectation.assertErrors;
|
| +import static com.google.dart.compiler.common.ErrorExpectation.errEx;
|
| +
|
| import java.io.Reader;
|
| import java.io.StringReader;
|
| import java.net.URI;
|
| @@ -116,7 +116,7 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| MethodElement methodElement = (MethodElement) functionElement.getEnclosingElement();
|
| assertNotNull(methodElement);
|
| assertSame(ElementKind.METHOD, methodElement.getKind());
|
| - assertEquals("foo", ((MethodElement) methodElement).getName());
|
| + assertEquals("foo", methodElement.getName());
|
| // use EnclosingElement methods implementations in MethodElement
|
| assertEquals(false, methodElement.isInterface());
|
| assertEquals(true, Iterables.isEmpty(methodElement.getMembers()));
|
| @@ -419,7 +419,7 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| * Factory constructor can instantiate any class and return it non-abstract class instance, but
|
| * spec requires warnings, so we provide it, but using different constant.
|
| */
|
| - public void test_warnAbstract_onAbstractClass_whenInstantiate_factoryConstructor()
|
| + public void test_abstractClass_whenInstantiate_factoryConstructor()
|
| throws Exception {
|
| AnalyzeLibraryResult libraryResult =
|
| analyzeLibrary(
|
| @@ -436,8 +436,7 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| " }",
|
| "}"));
|
| assertErrors(
|
| - libraryResult.getTypeErrors(),
|
| - errEx(TypeErrorCode.INSTANTIATION_OF_ABSTRACT_CLASS_USING_FACTORY, 8, 16, 1));
|
| + libraryResult.getTypeErrors());
|
| }
|
|
|
| /**
|
|
|