[K/N][Tests] Migrate framework and objcexport tests

^KT-61259
This commit is contained in:
Vladimir Sukharev
2024-01-22 20:12:14 +01:00
committed by Space Team
parent f00a145dd7
commit 025771460c
136 changed files with 698 additions and 416 deletions
@@ -0,0 +1,31 @@
import Kt
private func testFunctionsInDifferentFilesAreNotMangled() throws {
try assertEquals(actual: TopLevelManglingAKt.foo(), expected: "a1")
try assertEquals(actual: TopLevelManglingBKt.foo(), expected: "b1")
}
private func testPropertiesInDifferentFilesAreNotMangled() throws {
try assertEquals(actual: TopLevelManglingAKt.bar, expected: "a2")
try assertEquals(actual: TopLevelManglingBKt.bar, expected: "b2")
}
private func testFunctionsInSameFileAreMangled() throws {
try assertEquals(actual: TopLevelManglingAKt.sameNumber(value: Int32(1)), expected: 1)
#if DISABLE_MEMBER_NAME_MANGLING
let sameNumberLong = TopLevelManglingAKt.sameNumber(value: Int64(2))
#else
let sameNumberLong = TopLevelManglingAKt.sameNumber(value_: Int64(2))
#endif
try assertEquals(actual: sameNumberLong, expected: 2)
}
class TopLevelManglingTests : SimpleTestProvider {
override init() {
super.init()
test("TestFunctionsInDifferentFilesAreNotMangled", testFunctionsInDifferentFilesAreNotMangled)
test("TestPropertiesInDifferentFilesAreNotMangled", testPropertiesInDifferentFilesAreNotMangled)
test("TestFunctionsInSameFileAreMangled", testFunctionsInSameFileAreMangled)
}
}