Migrate all JDK 9 related tests to JDK 11
This commit is contained in:
committed by
TeamCityServer
parent
ce3562f0e8
commit
de7fb9606a
-1
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user