[Test] Migrate tests for java 9 to regular test infrastructure
This commit is contained in:
committed by
teamcityserver
parent
ca214bef30
commit
4f73ebbcbd
+82
@@ -41679,6 +41679,88 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/testsWithJava9")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class TestsWithJava9 {
|
||||
@Test
|
||||
public void testAllFilesPresentInTestsWithJava9() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/testsWithJava9"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic.kt")
|
||||
public void testConcatDynamic() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic200.kt")
|
||||
public void testConcatDynamic200() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic200.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic200Long.kt")
|
||||
public void testConcatDynamic200Long() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic200Long.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic201.kt")
|
||||
public void testConcatDynamic201() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic201.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicIndy200.kt")
|
||||
public void testConcatDynamicIndy200() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicIndy200Long.kt")
|
||||
public void testConcatDynamicIndy200Long() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200Long.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicIndy201.kt")
|
||||
public void testConcatDynamicIndy201() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy201.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicInlineClasses.kt")
|
||||
public void testConcatDynamicInlineClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicInlineClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicSpecialSymbols.kt")
|
||||
public void testConcatDynamicSpecialSymbols() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicSpecialSymbols.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicWithInline.kt")
|
||||
public void testConcatDynamicWithInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicWithInline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt36984.kt")
|
||||
public void testKt36984() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/kt36984.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varHandle.kt")
|
||||
public void testVarHandle() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/varHandle.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/throws")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
|
||||
// STRING_CONCAT: indy-with-constants
|
||||
// JVM_TARGET: 9
|
||||
fun box(): String {
|
||||
val p = 3147483648u
|
||||
@@ -7,4 +7,4 @@ fun box(): String {
|
||||
val s = a + "1" + "2" + 3 + 4L + b + 5.0 + 6F + '7' + true + false + 3147483647u + p
|
||||
|
||||
return if (s != "_1234_5.06.07truefalse31474836473147483648") "fail $s" else "OK"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
|
||||
// STRING_CONCAT: indy-with-constants
|
||||
// JVM_TARGET: 9
|
||||
fun box(): String {
|
||||
val z = "0"
|
||||
@@ -15,4 +15,4 @@ fun box(): String {
|
||||
|
||||
return if (result.length != 200)
|
||||
"fail: ${result.length}" else "OK"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
|
||||
// STRING_CONCAT: indy-with-constants
|
||||
// JVM_TARGET: 9
|
||||
fun test(z: Long): String {
|
||||
val result = "" + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
|
||||
@@ -24,4 +24,4 @@ fun box(): String {
|
||||
return if (result != "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
|
||||
"fail 2: ${result}"
|
||||
else "OK"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
|
||||
// STRING_CONCAT: indy-with-constants
|
||||
// JVM_TARGET: 9
|
||||
fun box(): String {
|
||||
val z = "0"
|
||||
@@ -16,4 +16,4 @@ fun box(): String {
|
||||
|
||||
return if (result.length != 201)
|
||||
"fail: ${result.length}" else "OK"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy
|
||||
// STRING_CONCAT: indy
|
||||
// JVM_TARGET: 9
|
||||
fun box(): String {
|
||||
val z = "0"
|
||||
@@ -15,4 +15,4 @@ fun box(): String {
|
||||
|
||||
return if (result.length != 200)
|
||||
"fail: ${result.length}" else "OK"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy
|
||||
// STRING_CONCAT: indy
|
||||
// JVM_TARGET: 9
|
||||
fun test(z: Long): String {
|
||||
val result = "" + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
|
||||
@@ -24,4 +24,4 @@ fun box(): String {
|
||||
return if (result != "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")
|
||||
"fail 2: ${result}"
|
||||
else "OK"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy
|
||||
// STRING_CONCAT: indy
|
||||
// JVM_TARGET: 9
|
||||
fun box(): String {
|
||||
val z = "0"
|
||||
@@ -16,4 +16,4 @@ fun box(): String {
|
||||
|
||||
return if (result.length != 201)
|
||||
"fail: ${result.length}" else "OK"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
|
||||
// STRING_CONCAT: indy-with-constants
|
||||
// JVM_TARGET: 9
|
||||
inline class Str(val s: String)
|
||||
inline class NStr(val s: String?)
|
||||
@@ -24,4 +24,4 @@ fun box(): String {
|
||||
if (test5 != "2nullnull") return "fail 5: $test5"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
|
||||
// STRING_CONCAT: indy-with-constants
|
||||
// JVM_TARGET: 9
|
||||
inline fun test(crossinline s: (String) -> String): String {
|
||||
var result = "1" + s("2") + "3" + 4 + {
|
||||
@@ -18,4 +18,4 @@ fun box(): String {
|
||||
|
||||
val result2 = test { it + "_" }
|
||||
return if (result2 != "12_3456_789_10") "fail 2: $result2" else "OK"
|
||||
}
|
||||
}
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
// !LANGUAGE: +PolymorphicSignature
|
||||
// TARGET_BACKEND: JVM
|
||||
// FULL_JDK
|
||||
// SKIP_JDK6
|
||||
// WITH_RUNTIME
|
||||
|
||||
@@ -30,4 +29,4 @@ fun box(): String {
|
||||
}
|
||||
|
||||
return if (handle.getVolatile(array, index) == newValue) "OK" else "Fail"
|
||||
}
|
||||
}
|
||||
+82
@@ -41523,6 +41523,88 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/testsWithJava9")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class TestsWithJava9 {
|
||||
@Test
|
||||
public void testAllFilesPresentInTestsWithJava9() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/testsWithJava9"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic.kt")
|
||||
public void testConcatDynamic() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic200.kt")
|
||||
public void testConcatDynamic200() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic200.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic200Long.kt")
|
||||
public void testConcatDynamic200Long() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic200Long.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic201.kt")
|
||||
public void testConcatDynamic201() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic201.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicIndy200.kt")
|
||||
public void testConcatDynamicIndy200() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicIndy200Long.kt")
|
||||
public void testConcatDynamicIndy200Long() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200Long.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicIndy201.kt")
|
||||
public void testConcatDynamicIndy201() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy201.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicInlineClasses.kt")
|
||||
public void testConcatDynamicInlineClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicInlineClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicSpecialSymbols.kt")
|
||||
public void testConcatDynamicSpecialSymbols() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicSpecialSymbols.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicWithInline.kt")
|
||||
public void testConcatDynamicWithInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicWithInline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt36984.kt")
|
||||
public void testKt36984() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/kt36984.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varHandle.kt")
|
||||
public void testVarHandle() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/varHandle.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/throws")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+82
@@ -41679,6 +41679,88 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/testsWithJava9")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class TestsWithJava9 {
|
||||
@Test
|
||||
public void testAllFilesPresentInTestsWithJava9() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/testsWithJava9"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic.kt")
|
||||
public void testConcatDynamic() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic200.kt")
|
||||
public void testConcatDynamic200() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic200.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic200Long.kt")
|
||||
public void testConcatDynamic200Long() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic200Long.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamic201.kt")
|
||||
public void testConcatDynamic201() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamic201.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicIndy200.kt")
|
||||
public void testConcatDynamicIndy200() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicIndy200Long.kt")
|
||||
public void testConcatDynamicIndy200Long() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy200Long.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicIndy201.kt")
|
||||
public void testConcatDynamicIndy201() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicIndy201.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicInlineClasses.kt")
|
||||
public void testConcatDynamicInlineClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicInlineClasses.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicSpecialSymbols.kt")
|
||||
public void testConcatDynamicSpecialSymbols() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicSpecialSymbols.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("concatDynamicWithInline.kt")
|
||||
public void testConcatDynamicWithInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/concatDynamicWithInline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt36984.kt")
|
||||
public void testKt36984() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/kt36984.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("varHandle.kt")
|
||||
public void testVarHandle() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/testsWithJava9/varHandle.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/throws")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+10
-1
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.test.runners.codegen
|
||||
|
||||
import org.jetbrains.kotlin.test.Constructor
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlin.test.TestJdkKind
|
||||
import org.jetbrains.kotlin.test.backend.BlackBoxCodegenSuppressor
|
||||
import org.jetbrains.kotlin.test.backend.handlers.BytecodeListingHandler
|
||||
import org.jetbrains.kotlin.test.backend.handlers.BytecodeTextHandler
|
||||
@@ -14,10 +15,11 @@ import org.jetbrains.kotlin.test.bind
|
||||
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
|
||||
import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.DIAGNOSTICS
|
||||
import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.REPORT_ONLY_EXPLICITLY_DEFINED_DEBUG_INFO
|
||||
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.JDK_KIND
|
||||
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.WITH_STDLIB
|
||||
import org.jetbrains.kotlin.test.frontend.classic.handlers.ClassicDiagnosticsHandler
|
||||
import org.jetbrains.kotlin.test.frontend.fir.handlers.FirDiagnosticsHandler
|
||||
import org.jetbrains.kotlin.test.model.*
|
||||
import org.jetbrains.kotlin.test.runners.AbstractDiagnosticTest.Companion.DISABLED_BY_DEFAULT_UNUSED_DIAGNOSTICS
|
||||
import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackendTest
|
||||
|
||||
abstract class AbstractJvmBlackBoxCodegenTestBase<R : ResultingArtifact.FrontendOutput<R>>(
|
||||
@@ -50,6 +52,13 @@ abstract class AbstractJvmBlackBoxCodegenTestBase<R : ResultingArtifact.Frontend
|
||||
}
|
||||
}
|
||||
|
||||
forTestsMatching("compiler/testData/codegen/box/testsWithJava9/*") {
|
||||
defaultDirectives {
|
||||
JDK_KIND with TestJdkKind.FULL_JDK_9
|
||||
+WITH_STDLIB
|
||||
}
|
||||
}
|
||||
|
||||
enableMetaInfoHandler()
|
||||
}
|
||||
}
|
||||
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.codegen
|
||||
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlin.test.TestJdkKind
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractJdk9BlackBoxCodegenTest : AbstractCustomJDKBlackBoxCodegenTest() {
|
||||
override fun getTestJdkKind(): TestJdkKind = TestJdkKind.FULL_JDK_9
|
||||
override fun getJdkHome(): File = KtTestUtil.getJdk9Home()
|
||||
override fun getPrefix(): String = "java9/box"
|
||||
}
|
||||
|
||||
abstract class AbstractJdk9IrBlackBoxCodegenTest : AbstractJdk9BlackBoxCodegenTest() {
|
||||
override val backend: TargetBackend
|
||||
get() = TargetBackend.JVM_IR
|
||||
}
|
||||
+7
-9
@@ -92,7 +92,13 @@ fun generateJUnit3CompilerTests(args: Array<String>) {
|
||||
"codegen/box",
|
||||
targetBackend = TargetBackend.JVM,
|
||||
skipIgnored = true,
|
||||
excludeDirs = listOf("ranges/stepped", "compileKotlinAgainstKotlin")
|
||||
excludeDirs = listOf(
|
||||
"ranges/stepped",
|
||||
"compileKotlinAgainstKotlin",
|
||||
"testsWithJava9",
|
||||
"testsWithJava15",
|
||||
"testsWithJava17"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -112,14 +118,6 @@ fun generateJUnit3CompilerTests(args: Array<String>) {
|
||||
model("codegen/java15/box", targetBackend = TargetBackend.JVM_IR)
|
||||
}
|
||||
|
||||
testClass<AbstractJdk9BlackBoxCodegenTest> {
|
||||
model("codegen/java9/box")
|
||||
}
|
||||
|
||||
testClass<AbstractJdk9IrBlackBoxCodegenTest> {
|
||||
model("codegen/java9/box", targetBackend = TargetBackend.JVM_IR)
|
||||
}
|
||||
|
||||
testClass<AbstractScriptCodegenTest> {
|
||||
model("codegen/script", extension = "kts")
|
||||
}
|
||||
|
||||
-91
@@ -1,91 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.codegen;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/codegen/java9/box")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class Jdk9BlackBoxCodegenTestGenerated extends AbstractJdk9BlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/java9/box"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamic.kt")
|
||||
public void testConcatDynamic() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamic.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamic200.kt")
|
||||
public void testConcatDynamic200() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamic200.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamic200Long.kt")
|
||||
public void testConcatDynamic200Long() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamic200Long.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamic201.kt")
|
||||
public void testConcatDynamic201() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamic201.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicIndy200.kt")
|
||||
public void testConcatDynamicIndy200() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicIndy200.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicIndy200Long.kt")
|
||||
public void testConcatDynamicIndy200Long() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicIndy200Long.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicIndy201.kt")
|
||||
public void testConcatDynamicIndy201() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicIndy201.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicInlineClasses.kt")
|
||||
public void testConcatDynamicInlineClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicInlineClasses.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicSpecialSymbols.kt")
|
||||
public void testConcatDynamicSpecialSymbols() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicSpecialSymbols.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicWithInline.kt")
|
||||
public void testConcatDynamicWithInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicWithInline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36984.kt")
|
||||
public void testKt36984() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/kt36984.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("varHandle.kt")
|
||||
public void testVarHandle() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/varHandle.kt");
|
||||
}
|
||||
}
|
||||
-92
@@ -1,92 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.codegen;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/codegen/java9/box")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class Jdk9IrBlackBoxCodegenTestGenerated extends AbstractJdk9IrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/java9/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamic.kt")
|
||||
public void testConcatDynamic() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamic.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamic200.kt")
|
||||
public void testConcatDynamic200() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamic200.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamic200Long.kt")
|
||||
public void testConcatDynamic200Long() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamic200Long.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamic201.kt")
|
||||
public void testConcatDynamic201() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamic201.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicIndy200.kt")
|
||||
public void testConcatDynamicIndy200() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicIndy200.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicIndy200Long.kt")
|
||||
public void testConcatDynamicIndy200Long() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicIndy200Long.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicIndy201.kt")
|
||||
public void testConcatDynamicIndy201() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicIndy201.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicInlineClasses.kt")
|
||||
public void testConcatDynamicInlineClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicInlineClasses.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicSpecialSymbols.kt")
|
||||
public void testConcatDynamicSpecialSymbols() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicSpecialSymbols.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("concatDynamicWithInline.kt")
|
||||
public void testConcatDynamicWithInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/concatDynamicWithInline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36984.kt")
|
||||
public void testKt36984() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/kt36984.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("varHandle.kt")
|
||||
public void testVarHandle() throws Exception {
|
||||
runTest("compiler/testData/codegen/java9/box/varHandle.kt");
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -27,7 +27,7 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true, "ranges/stepped", "compileKotlinAgainstKotlin");
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true, "ranges/stepped", "compileKotlinAgainstKotlin", "testsWithJava9", "testsWithJava15", "testsWithJava17");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/annotations")
|
||||
|
||||
@@ -128,6 +128,10 @@ class EnumValue(val enumClassId: ClassId, val enumEntryName: Name) : ConstantVal
|
||||
}
|
||||
|
||||
abstract class ErrorValue : ConstantValue<Unit>(Unit) {
|
||||
init {
|
||||
Unit
|
||||
}
|
||||
|
||||
@Deprecated("Should not be called, for this is not a real value, but a indication of an error")
|
||||
override val value: Unit
|
||||
get() = throw UnsupportedOperationException()
|
||||
|
||||
@@ -69,16 +69,22 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
testGroup("js/js.tests/tests-gen", "compiler/testData", testRunnerMethodName = "runTest0") {
|
||||
val jvmOnlyBoxTests = listOf(
|
||||
"testsWithJava9",
|
||||
"testsWithJava15",
|
||||
"testsWithJava17",
|
||||
)
|
||||
|
||||
testClass<AbstractJsCodegenBoxTest> {
|
||||
model("codegen/box", targetBackend = TargetBackend.JS, excludeDirs = listOf("compileKotlinAgainstKotlin"))
|
||||
model("codegen/box", targetBackend = TargetBackend.JS, excludeDirs = jvmOnlyBoxTests + "compileKotlinAgainstKotlin")
|
||||
}
|
||||
|
||||
testClass<AbstractIrJsCodegenBoxTest> {
|
||||
model("codegen/box", targetBackend = TargetBackend.JS_IR, excludeDirs = listOf("compileKotlinAgainstKotlin"))
|
||||
model("codegen/box", targetBackend = TargetBackend.JS_IR, excludeDirs = jvmOnlyBoxTests + "compileKotlinAgainstKotlin")
|
||||
}
|
||||
|
||||
testClass<AbstractIrJsCodegenBoxErrorTest> {
|
||||
model("codegen/boxError", targetBackend = TargetBackend.JS_IR, excludeDirs = listOf("compileKotlinAgainstKotlin"))
|
||||
model("codegen/boxError", targetBackend = TargetBackend.JS_IR, excludeDirs = jvmOnlyBoxTests + "compileKotlinAgainstKotlin")
|
||||
}
|
||||
|
||||
testClass<AbstractIrCodegenBoxWasmTest> {
|
||||
@@ -104,12 +110,12 @@ fun main(args: Array<String>) {
|
||||
"delegatedProperty",
|
||||
|
||||
"compileKotlinAgainstKotlin"
|
||||
)
|
||||
) + jvmOnlyBoxTests
|
||||
)
|
||||
}
|
||||
|
||||
testClass<AbstractIrJsCodegenBoxES6Test> {
|
||||
model("codegen/box", targetBackend = TargetBackend.JS_IR_ES6)
|
||||
model("codegen/box", targetBackend = TargetBackend.JS_IR_ES6, excludeDirs = jvmOnlyBoxTests)
|
||||
}
|
||||
|
||||
testClass<AbstractJsCodegenInlineTest> {
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+1
-1
@@ -27,7 +27,7 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true, "testsWithJava9", "testsWithJava15", "testsWithJava17");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/annotations")
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public class IrJsCodegenBoxErrorTestGenerated extends AbstractIrJsCodegenBoxErro
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBoxError() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxError"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "compileKotlinAgainstKotlin");
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxError"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "testsWithJava9", "testsWithJava15", "testsWithJava17", "compileKotlinAgainstKotlin");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxError/semantic")
|
||||
|
||||
Generated
+1
-1
@@ -27,7 +27,7 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "compileKotlinAgainstKotlin");
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true, "testsWithJava9", "testsWithJava15", "testsWithJava17", "compileKotlinAgainstKotlin");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/annotations")
|
||||
|
||||
Generated
+1
-1
@@ -27,7 +27,7 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true, "compileKotlinAgainstKotlin");
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true, "testsWithJava9", "testsWithJava15", "testsWithJava17", "compileKotlinAgainstKotlin");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/annotations")
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+1
-1
@@ -27,7 +27,7 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true, "toArray", "classLiteral", "reflection", "contracts", "platformTypes", "ranges/stepped/unsigned", "coroutines", "parametersMetadata", "finally", "deadCodeElimination", "controlStructures/tryCatchInExpressions", "delegatedProperty", "compileKotlinAgainstKotlin");
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true, "toArray", "classLiteral", "reflection", "contracts", "platformTypes", "ranges/stepped/unsigned", "coroutines", "parametersMetadata", "finally", "deadCodeElimination", "controlStructures/tryCatchInExpressions", "delegatedProperty", "compileKotlinAgainstKotlin", "testsWithJava9", "testsWithJava15", "testsWithJava17");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/annotations")
|
||||
|
||||
Reference in New Issue
Block a user