[K/N][Tests] Move funptr.kt to standalone tests due to OUTPUT_DATA_FILE directive
^KT-61259
This commit is contained in:
committed by
Space Team
parent
c286b0efd7
commit
2f3705f0eb
compiler/testData/codegen/box/cinterop/funptr.kt → native/native.tests/testData/standalone/funptr.kt
Vendored
+1
-3
@@ -116,7 +116,7 @@ typealias NotSoLongSignatureFunction = (
|
||||
Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int
|
||||
) -> Int
|
||||
|
||||
fun box(): String {
|
||||
fun main() {
|
||||
val atoiPtr = getAtoiPtr()!!
|
||||
|
||||
val getPrintIntPtrPtr = getGetPrintIntPtrPtr()!!
|
||||
@@ -145,8 +145,6 @@ fun box(): String {
|
||||
val notSoLongSignaturePtr: CPointer<CFunction<NotSoLongSignatureFunction>>? = getNotSoLongSignatureFunctionPtr()
|
||||
printIntPtr(notSoLongSignaturePtr!!.invoke(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
|
||||
printIntPtr(notSoLongSignatureFunction(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
fun Boolean.ifThenOneElseZero() = if (this) 1 else 0
|
||||
-6
@@ -4808,12 +4808,6 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
runTest("compiler/testData/codegen/box/cinterop/forwardDeclarationsTwoLibs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funptr.kt")
|
||||
public void testFunptr() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/cinterop/funptr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("globals.kt")
|
||||
public void testGlobals() throws Exception {
|
||||
|
||||
-6
@@ -4918,12 +4918,6 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
runTest("compiler/testData/codegen/box/cinterop/forwardDeclarationsTwoLibs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funptr.kt")
|
||||
public void testFunptr() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/cinterop/funptr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("globals.kt")
|
||||
public void testGlobals() throws Exception {
|
||||
|
||||
+6
@@ -34,6 +34,12 @@ public class FirNativeStandaloneTestGenerated extends AbstractNativeBlackBoxTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/standalone"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funptr.kt")
|
||||
public void testFunptr() throws Exception {
|
||||
runTest("native/native.tests/testData/standalone/funptr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt56048.kt")
|
||||
public void testKt56048() throws Exception {
|
||||
|
||||
-6
@@ -4698,12 +4698,6 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/cinterop/forwardDeclarationsTwoLibs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funptr.kt")
|
||||
public void testFunptr() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/cinterop/funptr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("globals.kt")
|
||||
public void testGlobals() throws Exception {
|
||||
|
||||
-6
@@ -4809,12 +4809,6 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/cinterop/forwardDeclarationsTwoLibs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funptr.kt")
|
||||
public void testFunptr() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/cinterop/funptr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("globals.kt")
|
||||
public void testGlobals() throws Exception {
|
||||
|
||||
+6
@@ -31,6 +31,12 @@ public class NativeStandaloneTestGenerated extends AbstractNativeBlackBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/standalone"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("funptr.kt")
|
||||
public void testFunptr() throws Exception {
|
||||
runTest("native/native.tests/testData/standalone/funptr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt56048.kt")
|
||||
public void testKt56048() throws Exception {
|
||||
|
||||
+7
-1
@@ -34,6 +34,7 @@ import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.FREE_COMP
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.IGNORE_NATIVE
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.IGNORE_NATIVE_K1
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.IGNORE_NATIVE_K2
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.OUTPUT_DATA_FILE
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.runner.TestRunCheck
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.runner.TestRunChecks
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.settings.*
|
||||
@@ -52,6 +53,7 @@ import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.IGNORE_BACKEND
|
||||
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.IGNORE_BACKEND_K2
|
||||
import org.jetbrains.kotlin.test.directives.model.StringDirective
|
||||
import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertTrue
|
||||
import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertFalse
|
||||
import org.jetbrains.kotlin.test.services.JUnit5Assertions.fail
|
||||
import org.jetbrains.kotlin.utils.addIfNotNull
|
||||
import java.io.File
|
||||
@@ -126,7 +128,11 @@ private class ExtTestDataFile(
|
||||
else
|
||||
MANDATORY_SOURCE_TRANSFORMERS + customSourceTransformers
|
||||
|
||||
structureFactory.ExtTestDataFileStructure(testDataFile, allSourceTransformers)
|
||||
structureFactory.ExtTestDataFileStructure(testDataFile, allSourceTransformers).also {
|
||||
assertFalse(it.directives.contains(OUTPUT_DATA_FILE.name)) {
|
||||
"${testDataFile.absolutePath}: directive ${OUTPUT_DATA_FILE.name} is not supported by ExtTestDataFile"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val isExpectedFailure: Boolean = settings.isIgnoredTarget(structure.directives)
|
||||
|
||||
Reference in New Issue
Block a user