Migrate all JDK 9 related tests to JDK 11

This commit is contained in:
Dmitriy Novozhilov
2021-09-22 17:21:53 +03:00
committed by TeamCityServer
parent ce3562f0e8
commit de7fb9606a
92 changed files with 284 additions and 306 deletions
@@ -264,7 +264,6 @@ open class AbstractClassFileToSourceStubConverterTest : AbstractKotlinKapt3Test(
addOrRemoveFlag(KaptFlag.KEEP_KDOC_COMMENTS_IN_STUBS, testFile)
super.doTest(filePath)
doTestWithJdk9(AbstractClassFileToSourceStubConverterTest::class.java, filePath)
doTestWithJdk11(AbstractClassFileToSourceStubConverterTest::class.java, filePath)
}
@@ -20,7 +20,7 @@ class IrKotlinKapt3IntegrationTests : AbstractIrKotlinKapt3IntegrationTest(), Cu
) {
super.test(name, *supportedAnnotations, options = options, process = process)
doTestWithJdk9(
doTestWithJdk11(
SingleJUnitTestRunner::class.java,
IrKotlinKapt3IntegrationTests::class.java.name + "#test" + getTestName(false)
)
@@ -34,4 +34,4 @@ class IrKotlinKapt3IntegrationTests : AbstractIrKotlinKapt3IntegrationTest(), Cu
assertEquals("myMethod", annotatedElements.single().simpleName.toString())
}
}
}
@@ -43,7 +43,7 @@ class KotlinKapt3IntegrationTests : AbstractKotlinKapt3IntegrationTest(), Custom
) {
super.test(name, *supportedAnnotations, options = options, process = process)
doTestWithJdk9(
doTestWithJdk11(
SingleJUnitTestRunner::class.java,
KotlinKapt3IntegrationTests::class.java.name + "#test" + getTestName(false)
)
@@ -228,4 +228,4 @@ internal class SingleJUnitTestRunner {
exitProcess(if (result.wasSuccessful()) 0 else 1)
}
}
}
}
@@ -26,13 +26,6 @@ import java.net.URLClassLoader
import java.util.concurrent.TimeUnit
interface CustomJdkTestLauncher {
fun doTestWithJdk9(mainClass: Class<*>, arg: String) {
// Already under Java 9
if (isJava9OrLater()) return
doTestCustomJdk(mainClass, arg, KtTestUtil.getJdk9Home())
}
fun doTestWithJdk11(mainClass: Class<*>, arg: String) {
if (isJava9OrLater()) return
KtTestUtil.getJdk11Home().let { doTestCustomJdk(mainClass, arg, it) }