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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java

Issue 10693074: Another small batch of Junit test for errors in the resolver (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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: compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
index 8bb5228eaf8b395b88ea0ea2081e3e38d1fd87d3..a683c4c39059af0f02bbf15110b03a2b749510e5 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTestCase.java
@@ -182,6 +182,7 @@ abstract class ResolverTestCase extends TestCase {
private final InterfaceType dynamicType;
private final InterfaceType defaultMapLiteralType;
private final InterfaceType defaultListType;
+ private final Type voidType;
private final ClassElement objectElement;
{
@@ -221,6 +222,8 @@ abstract class ResolverTestCase extends TestCase {
ClassElement listElement = Elements.classNamed("List");
defaultListType = Types.interfaceType(listElement, Lists.<Type>newArrayList(dynamicType));
listElement.setType(defaultListType);
+
+ voidType = Types.newVoidType();
}
MockCoreTypeProvider(ClassElement objectElement) {
@@ -269,7 +272,7 @@ abstract class ResolverTestCase extends TestCase {
@Override
public Type getVoidType() {
- throw new AssertionError();
+ return voidType;
}
@Override
@@ -482,8 +485,8 @@ abstract class ResolverTestCase extends TestCase {
checkExpectedErrors(resolveErrors, errorCodes, source);
return resolveErrors;
}
-
- protected List<DartCompilationError> resolveAndTest(String source,
+
+ protected List<DartCompilationError> resolveAndTest(String source,
ErrorExpectation... expectedErrors) {
// parse DartUnit
DartUnit unit = parseUnit(source);

Powered by Google App Engine
This is Rietveld 408576698