Switch to 202 platform

This commit is contained in:
Dmitriy Novozhilov
2020-11-28 14:25:19 +03:00
parent 89bba93615
commit eeb9b3214c
86 changed files with 262 additions and 263 deletions
@@ -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) {
@@ -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) {
@@ -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.");
}
}
}
@@ -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());
}
}
}