Revert "Replace K2 prefixes in test files to Fir"
This reverts commit f1c673c166.
This commit is contained in:
+46692
File diff suppressed because it is too large
Load Diff
+198
@@ -0,0 +1,198 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2023 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.konan.blackboxtest;
|
||||||
|
|
||||||
|
import com.intellij.testFramework.TestDataPath;
|
||||||
|
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||||
|
import org.junit.jupiter.api.Tag;
|
||||||
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.K2Pipeline;
|
||||||
|
import org.jetbrains.kotlin.test.TestMetadata;
|
||||||
|
import org.junit.jupiter.api.Nested;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateNativeTestsKt}. DO NOT MODIFY MANUALLY */
|
||||||
|
@SuppressWarnings("all")
|
||||||
|
@TestMetadata("native/native.tests/testData/klibContents")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@Tag("k2libContents")
|
||||||
|
@K2Pipeline()
|
||||||
|
public class NativeK2LibContentsTestGenerated extends AbstractNativeKlibContentsTest {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInKlibContents() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klibContents"), Pattern.compile("^([^_](.+)).kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("annotations.kt")
|
||||||
|
public void testAnnotations() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/annotations.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("annotations_source_retention.kt")
|
||||||
|
public void testAnnotations_source_retention() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/annotations_source_retention.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt55464_serializeTypeAnnotation.kt")
|
||||||
|
public void testKt55464_serializeTypeAnnotation() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/kt55464_serializeTypeAnnotation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56018_value_parameters_annotations.kt")
|
||||||
|
public void testKt56018_value_parameters_annotations() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/kt56018_value_parameters_annotations.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("type_annotations.kt")
|
||||||
|
public void testType_annotations() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/type_annotations.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("native/native.tests/testData/klibContents/builtinsSerializer")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@Tag("k2libContents")
|
||||||
|
@K2Pipeline()
|
||||||
|
public class BuiltinsSerializer {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInBuiltinsSerializer() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klibContents/builtinsSerializer"), Pattern.compile("^([^_](.+)).kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("annotatedEnumEntry.kt")
|
||||||
|
public void testAnnotatedEnumEntry() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/annotatedEnumEntry.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("annotationTargets.kt")
|
||||||
|
public void testAnnotationTargets() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/annotationTargets.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("binaryRetainedAnnotation.kt")
|
||||||
|
public void testBinaryRetainedAnnotation() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/binaryRetainedAnnotation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("compileTimeConstants.kt")
|
||||||
|
public void testCompileTimeConstants() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/compileTimeConstants.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("nestedClassesAndObjects.kt")
|
||||||
|
public void testNestedClassesAndObjects() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/nestedClassesAndObjects.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("propertyAccessorAnnotations.kt")
|
||||||
|
public void testPropertyAccessorAnnotations() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/propertyAccessorAnnotations.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("simple.kt")
|
||||||
|
public void testSimple() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/simple.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("sourceRetainedAnnotation.kt")
|
||||||
|
public void testSourceRetainedAnnotation() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/sourceRetainedAnnotation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("typeParameterAnnotation.kt")
|
||||||
|
public void testTypeParameterAnnotation() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/typeParameterAnnotation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@Tag("k2libContents")
|
||||||
|
@K2Pipeline()
|
||||||
|
public class AnnotationArguments {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInAnnotationArguments() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments"), Pattern.compile("^([^_](.+)).kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("annotation.kt")
|
||||||
|
public void testAnnotation() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/annotation.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("enum.kt")
|
||||||
|
public void testEnum() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/enum.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("primitiveArrays.kt")
|
||||||
|
public void testPrimitiveArrays() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/primitiveArrays.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("primitives.kt")
|
||||||
|
public void testPrimitives() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/primitives.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("string.kt")
|
||||||
|
public void testString() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/string.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("varargs.kt")
|
||||||
|
public void testVarargs() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/builtinsSerializer/annotationArguments/varargs.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("native/native.tests/testData/klibContents/klib")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@Tag("k2libContents")
|
||||||
|
@K2Pipeline()
|
||||||
|
public class Klib {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInKlib() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/klibContents/klib"), Pattern.compile("^([^_](.+)).kt$"), null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("fieldAnnotations.kt")
|
||||||
|
public void testFieldAnnotations() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/klib/fieldAnnotations.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("receiverAnnotations.kt")
|
||||||
|
public void testReceiverAnnotations() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/klibContents/klib/receiverAnnotations.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+6
-6
@@ -11,7 +11,7 @@ import org.jetbrains.kotlin.konan.blackboxtest.*
|
|||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.ClassLevelProperty
|
import org.jetbrains.kotlin.konan.blackboxtest.support.ClassLevelProperty
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.EnforcedHostTarget
|
import org.jetbrains.kotlin.konan.blackboxtest.support.EnforcedHostTarget
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.EnforcedProperty
|
import org.jetbrains.kotlin.konan.blackboxtest.support.EnforcedProperty
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.FirPipeline
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.K2Pipeline
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.UseExtTestCaseGroupProvider
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.UseExtTestCaseGroupProvider
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.UseStandardTestCaseGroupProvider
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.UseStandardTestCaseGroupProvider
|
||||||
import org.jetbrains.kotlin.test.TargetBackend
|
import org.jetbrains.kotlin.test.TargetBackend
|
||||||
@@ -34,8 +34,8 @@ fun main() {
|
|||||||
|
|
||||||
testGroup("native/native.tests/tests-gen", "compiler/testData") {
|
testGroup("native/native.tests/tests-gen", "compiler/testData") {
|
||||||
testClass<AbstractNativeCodegenBoxTest>(
|
testClass<AbstractNativeCodegenBoxTest>(
|
||||||
suiteTestClassName = "FirNativeCodegenBoxTestGenerated",
|
suiteTestClassName = "K2NativeCodegenBoxTestGenerated",
|
||||||
annotations = listOf(codegenK2(), provider<UseExtTestCaseGroupProvider>(), provider<FirPipeline>())
|
annotations = listOf(codegenK2(), provider<UseExtTestCaseGroupProvider>(), provider<K2Pipeline>())
|
||||||
) {
|
) {
|
||||||
model("codegen/box", targetBackend = TargetBackend.NATIVE)
|
model("codegen/box", targetBackend = TargetBackend.NATIVE)
|
||||||
model("codegen/boxInline", targetBackend = TargetBackend.NATIVE)
|
model("codegen/boxInline", targetBackend = TargetBackend.NATIVE)
|
||||||
@@ -104,7 +104,7 @@ fun main() {
|
|||||||
// Klib contents tests
|
// Klib contents tests
|
||||||
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
||||||
testClass<AbstractNativeKlibContentsTest>(
|
testClass<AbstractNativeKlibContentsTest>(
|
||||||
suiteTestClassName = "NativeKLibContentsTestGenerated",
|
suiteTestClassName = "NativeK1LibContentsTestGenerated",
|
||||||
annotations = listOf(k1libContents())
|
annotations = listOf(k1libContents())
|
||||||
) {
|
) {
|
||||||
model("klibContents", pattern = "^([^_](.+)).kt$", recursive = true)
|
model("klibContents", pattern = "^([^_](.+)).kt$", recursive = true)
|
||||||
@@ -112,8 +112,8 @@ fun main() {
|
|||||||
}
|
}
|
||||||
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
testGroup("native/native.tests/tests-gen", "native/native.tests/testData") {
|
||||||
testClass<AbstractNativeKlibContentsTest>(
|
testClass<AbstractNativeKlibContentsTest>(
|
||||||
suiteTestClassName = "FirNativeKLibContentsTestGenerated",
|
suiteTestClassName = "NativeK2LibContentsTestGenerated",
|
||||||
annotations = listOf(k2libContents(), provider<FirPipeline>())
|
annotations = listOf(k2libContents(), provider<K2Pipeline>())
|
||||||
) {
|
) {
|
||||||
model("klibContents", pattern = "^([^_](.+)).kt$", recursive = true)
|
model("klibContents", pattern = "^([^_](.+)).kt$", recursive = true)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -7,7 +7,7 @@ package org.jetbrains.kotlin.konan.blackboxtest
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.TestCaseId
|
import org.jetbrains.kotlin.konan.blackboxtest.support.TestCaseId
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.TestRunnerType
|
import org.jetbrains.kotlin.konan.blackboxtest.support.TestRunnerType
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.FirPipeline
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.K2Pipeline
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCases
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCases
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCase as TC
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCase as TC
|
||||||
import org.junit.jupiter.api.Tag
|
import org.junit.jupiter.api.Tag
|
||||||
@@ -51,7 +51,7 @@ class KotlinTestLibraryTest : AbstractNativeBlackBoxTest() {
|
|||||||
sourceLocations = ["libraries/kotlin.test/common/src/test/kotlin/**.kt"]
|
sourceLocations = ["libraries/kotlin.test/common/src/test/kotlin/**.kt"]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@FirPipeline
|
@K2Pipeline
|
||||||
class KotlinTestK2LibraryTest : AbstractNativeBlackBoxTest() {
|
class KotlinTestK2LibraryTest : AbstractNativeBlackBoxTest() {
|
||||||
@TestFactory
|
@TestFactory
|
||||||
fun default() = dynamicTestCase(TestCaseId.Named("default"))
|
fun default() = dynamicTestCase(TestCaseId.Named("default"))
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ package org.jetbrains.kotlin.konan.blackboxtest
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.TestCaseId
|
import org.jetbrains.kotlin.konan.blackboxtest.support.TestCaseId
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.TestRunnerType
|
import org.jetbrains.kotlin.konan.blackboxtest.support.TestRunnerType
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.FirPipeline
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.K2Pipeline
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedPaths.KOTLIN_NATIVE_DISTRIBUTION
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedPaths.KOTLIN_NATIVE_DISTRIBUTION
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCase as TC
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCase as TC
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCases
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.PredefinedTestCases
|
||||||
@@ -110,7 +110,7 @@ class StdlibTest : AbstractNativeBlackBoxTest() {
|
|||||||
ignoredTests = [DISABLED_STDLIB_TEST]
|
ignoredTests = [DISABLED_STDLIB_TEST]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@FirPipeline
|
@K2Pipeline
|
||||||
class StdlibK2Test : AbstractNativeBlackBoxTest() {
|
class StdlibK2Test : AbstractNativeBlackBoxTest() {
|
||||||
@TestFactory
|
@TestFactory
|
||||||
fun default() = dynamicTestCase(TestCaseId.Named("default"))
|
fun default() = dynamicTestCase(TestCaseId.Named("default"))
|
||||||
|
|||||||
+2
-2
@@ -11,7 +11,7 @@ import org.jetbrains.kotlin.konan.blackboxtest.support.NativeTestSupport.getOrCr
|
|||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.NativeTestSupport.getOrCreateTestRunProvider
|
import org.jetbrains.kotlin.konan.blackboxtest.support.NativeTestSupport.getOrCreateTestRunProvider
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.DisabledTests
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.DisabledTests
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.DisabledTestsIfProperty
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.DisabledTestsIfProperty
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.FirPipeline
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.K2Pipeline
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.group.TestCaseGroupProvider
|
import org.jetbrains.kotlin.konan.blackboxtest.support.group.TestCaseGroupProvider
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.SimpleTestRunProvider
|
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.SimpleTestRunProvider
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.TestRunProvider
|
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.TestRunProvider
|
||||||
@@ -441,7 +441,7 @@ private object NativeTestSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun computePipelineType(testClass: Class<*>): PipelineType {
|
private fun computePipelineType(testClass: Class<*>): PipelineType {
|
||||||
return if (testClass.annotations.any { it is FirPipeline })
|
return if (testClass.annotations.any { it is K2Pipeline })
|
||||||
PipelineType.K2
|
PipelineType.K2
|
||||||
else PipelineType.K1
|
else PipelineType.K1
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -5,4 +5,4 @@
|
|||||||
package org.jetbrains.kotlin.konan.blackboxtest.support.group
|
package org.jetbrains.kotlin.konan.blackboxtest.support.group
|
||||||
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
internal annotation class FirPipeline
|
internal annotation class K2Pipeline
|
||||||
Reference in New Issue
Block a user