[K/N][Tests] Add test for KT-65659
^KT-65659
This commit is contained in:
committed by
Space Team
parent
090407b7e3
commit
243d6aed50
@@ -0,0 +1,9 @@
|
||||
typealias MyThrows = kotlin.Throws
|
||||
|
||||
class Foo {
|
||||
@kotlin.Throws(Exception::class)
|
||||
fun noalias() {}
|
||||
|
||||
@MyThrows(Exception::class)
|
||||
fun aliased() {}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.native.executors.runProcess
|
||||
import org.jetbrains.kotlin.test.KtAssert.fail
|
||||
import org.jetbrains.kotlin.test.services.JUnit5Assertions.assertTrue
|
||||
import org.junit.jupiter.api.Assumptions
|
||||
import org.junit.jupiter.api.Disabled
|
||||
import org.junit.jupiter.api.Tag
|
||||
import org.junit.jupiter.api.Test
|
||||
import java.io.File
|
||||
@@ -40,6 +41,23 @@ abstract class FrameworkTestBase : AbstractNativeSimpleTest() {
|
||||
private val extras = TestCase.NoTestRunnerExtras("There's no entrypoint in Swift program")
|
||||
private val testCompilationFactory = TestCompilationFactory()
|
||||
|
||||
@Disabled("KT-65659 is not yet fixed for K2")
|
||||
@Test
|
||||
fun testKT65659() {
|
||||
Assumptions.assumeTrue(targets.testTarget.family.isAppleFamily)
|
||||
val testDataFile = testSuiteDir.resolve("kt65659.kt")
|
||||
val testCase = generateObjCFrameworkTestCase(
|
||||
TestKind.STANDALONE_NO_TR,
|
||||
extras,
|
||||
"kt65659",
|
||||
listOf(testDataFile),
|
||||
TestCompilerArgs(listOf("-Xbinary=bundleId=kt65659")),
|
||||
)
|
||||
val objCFrameworkCompilation = testCompilationFactory.testCaseToObjCFrameworkCompilation(testCase, testRunSettings)
|
||||
val compilationResult = objCFrameworkCompilation.result.assertSuccess()
|
||||
assertTrue(compilationResult.resultingArtifact.mainHeader.readText().contains("aliasedAndReturnError"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testSignextZeroext() {
|
||||
Assumptions.assumeTrue(targets.testTarget.family.isAppleFamily)
|
||||
|
||||
Reference in New Issue
Block a user