Do not exclude codegen/box/script directory from JVM ABI tests
This commit is contained in:
committed by
Space Team
parent
9bbf15c14a
commit
224a4e1e3c
+43
@@ -0,0 +1,43 @@
|
||||
MODULE lib
|
||||
CLASS Script.class
|
||||
CLASS METADATA
|
||||
K1
|
||||
<init>([Ljava/lang/String;)V
|
||||
K2
|
||||
---
|
||||
Property: class.metadata.superTypes
|
||||
K1
|
||||
[kotlin/script/templates/standard/ScriptTemplateWithArgs]
|
||||
K2
|
||||
[]
|
||||
Property: class.metadata.contextReceiverTypes
|
||||
K1
|
||||
[]
|
||||
K2
|
||||
[kotlin/script/templates/standard/ScriptTemplateWithArgs]
|
||||
MODULE main
|
||||
CLASS TestKt.class
|
||||
Annotation: class.invisibleAnnotations
|
||||
K1
|
||||
@Lkotlin/jvm/internal/SourceDebugExtension;( value: #{ SMAP
|
||||
test.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 test.kt
|
||||
TestKt
|
||||
+ 2 ArrayIntrinsics.kt
|
||||
kotlin/ArrayIntrinsicsKt
|
||||
*L
|
||||
1#1,29:1
|
||||
26#2:30
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 test.kt
|
||||
TestKt
|
||||
*L
|
||||
22#1:30
|
||||
*E
|
||||
} )
|
||||
K2
|
||||
---
|
||||
@@ -3,6 +3,7 @@
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
// !LANGUAGE: -SkipStandaloneScriptsInSourceRoots
|
||||
// WITH_STDLIB
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63963, KT-63960, KT-62465
|
||||
|
||||
// Although this test works in K1 just fine, it is named with the suffix K2 to show that the demonstrated method is the only one
|
||||
// available so far to call a script from another module.
|
||||
|
||||
+59
-1
@@ -23,7 +23,7 @@ import java.util.regex.Pattern;
|
||||
public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistencyTest {
|
||||
@Test
|
||||
public void testAllFilesPresentInBox() {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "multiplatform/k2", "script");
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true, "multiplatform/k2");
|
||||
}
|
||||
|
||||
@Nested
|
||||
@@ -50686,6 +50686,64 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/script")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Script {
|
||||
@Test
|
||||
public void testAllFilesPresentInScript() {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/script"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classReference.kt")
|
||||
public void testClassReference() {
|
||||
runTest("compiler/testData/codegen/box/script/classReference.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localCaptureTests.kt")
|
||||
public void testLocalCaptureTests() {
|
||||
runTest("compiler/testData/codegen/box/script/localCaptureTests.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localCaptureTestsK2.kt")
|
||||
public void testLocalCaptureTestsK2() {
|
||||
runTest("compiler/testData/codegen/box/script/localCaptureTestsK2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("scripInstance.kt")
|
||||
public void testScripInstance() {
|
||||
runTest("compiler/testData/codegen/box/script/scripInstance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("scriptNestedClassInstance.kt")
|
||||
public void testScriptNestedClassInstance() {
|
||||
runTest("compiler/testData/codegen/box/script/scriptNestedClassInstance.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("scriptNestedClassInstanceK2.kt")
|
||||
public void testScriptNestedClassInstanceK2() {
|
||||
runTest("compiler/testData/codegen/box/script/scriptNestedClassInstanceK2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("scriptPropFromAnotherModuleK2.kt")
|
||||
public void testScriptPropFromAnotherModuleK2() {
|
||||
runTest("compiler/testData/codegen/box/script/scriptPropFromAnotherModuleK2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("syntheticJavaPropertyInScript.kt")
|
||||
public void testSyntheticJavaPropertyInScript() {
|
||||
runTest("compiler/testData/codegen/box/script/syntheticJavaPropertyInScript.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/codegen/box/sealed")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ fun generateJUnit5CompilerTests(args: Array<String>, mainClassName: String?) {
|
||||
|
||||
// We split JVM ABI tests into two parts, to avoid creation of a huge file, unable to analyze by IntelliJ with default settings
|
||||
testClass<AbstractJvmAbiConsistencyTest>("JvmAbiConsistencyTestBoxGenerated") {
|
||||
model("codegen/box", excludeDirs = k2BoxTestDir + excludedScriptDirs)
|
||||
model("codegen/box", excludeDirs = k2BoxTestDir)
|
||||
}
|
||||
|
||||
testClass<AbstractJvmAbiConsistencyTest>("JvmAbiConsistencyTestRestGenerated") {
|
||||
|
||||
Reference in New Issue
Block a user