Switch to 202 platform
This commit is contained in:
-1
@@ -140,7 +140,6 @@ public abstract class KtParsingTestCase extends KtPlatformLiteFixture {
|
||||
// That's for reparse routines
|
||||
final PomModelImpl pomModel = new PomModelImpl(myProject);
|
||||
myProject.registerService(PomModel.class, pomModel);
|
||||
new TreeAspect(pomModel);
|
||||
}
|
||||
|
||||
public void configureFromParserDefinition(ParserDefinition definition, String extension) {
|
||||
|
||||
+1
@@ -140,6 +140,7 @@ public abstract class KtParsingTestCase extends KtPlatformLiteFixture {
|
||||
// That's for reparse routines
|
||||
final PomModelImpl pomModel = new PomModelImpl(myProject);
|
||||
myProject.registerService(PomModel.class, pomModel);
|
||||
new TreeAspect(pomModel);
|
||||
}
|
||||
|
||||
public void configureFromParserDefinition(ParserDefinition definition, String extension) {
|
||||
+5
-3
@@ -82,6 +82,9 @@ import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
@SuppressWarnings("ALL")
|
||||
public abstract class KtUsefulTestCase extends TestCase {
|
||||
public static final boolean IS_UNDER_TEAMCITY = System.getenv("TEAMCITY_VERSION") != null;
|
||||
@@ -1081,8 +1084,7 @@ public abstract class KtUsefulTestCase extends TestCase {
|
||||
|
||||
if (shouldOccur) {
|
||||
wasThrown = true;
|
||||
final String errorMessage = exceptionCase.getAssertionErrorMessage();
|
||||
assertEquals(errorMessage, exceptionCase.getExpectedExceptionClass(), cause.getClass());
|
||||
assertInstanceOf(cause, exceptionCase.getExpectedExceptionClass());
|
||||
if (expectedErrorMsgPart != null) {
|
||||
assertTrue(cause.getMessage(), cause.getMessage().contains(expectedErrorMsgPart));
|
||||
}
|
||||
@@ -1103,7 +1105,7 @@ public abstract class KtUsefulTestCase extends TestCase {
|
||||
}
|
||||
finally {
|
||||
if (shouldOccur && !wasThrown) {
|
||||
fail(exceptionCase.getAssertionErrorMessage());
|
||||
fail(exceptionCase.getExpectedExceptionClass().getName() + " must be thrown.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-5
@@ -82,9 +82,6 @@ import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
@SuppressWarnings("ALL")
|
||||
public abstract class KtUsefulTestCase extends TestCase {
|
||||
public static final boolean IS_UNDER_TEAMCITY = System.getenv("TEAMCITY_VERSION") != null;
|
||||
@@ -1084,7 +1081,8 @@ public abstract class KtUsefulTestCase extends TestCase {
|
||||
|
||||
if (shouldOccur) {
|
||||
wasThrown = true;
|
||||
assertInstanceOf(cause, exceptionCase.getExpectedExceptionClass());
|
||||
final String errorMessage = exceptionCase.getAssertionErrorMessage();
|
||||
assertEquals(errorMessage, exceptionCase.getExpectedExceptionClass(), cause.getClass());
|
||||
if (expectedErrorMsgPart != null) {
|
||||
assertTrue(cause.getMessage(), cause.getMessage().contains(expectedErrorMsgPart));
|
||||
}
|
||||
@@ -1105,7 +1103,7 @@ public abstract class KtUsefulTestCase extends TestCase {
|
||||
}
|
||||
finally {
|
||||
if (shouldOccur && !wasThrown) {
|
||||
fail(exceptionCase.getExpectedExceptionClass().getName() + " must be thrown.");
|
||||
fail(exceptionCase.getAssertionErrorMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user