[K/N][Tests] Migrate objcSmoke & objcTests tests
^KT-61259
This commit is contained in:
committed by
Space Team
parent
58f7dd1c83
commit
524f0d335e
@@ -0,0 +1,18 @@
|
||||
import kotlin.test.*
|
||||
import objcTests.*
|
||||
@Test
|
||||
fun testKT35544() {
|
||||
val exception = assertFailsWith<ClassCastException> {
|
||||
123 as NSString
|
||||
}
|
||||
assertEquals("class kotlin.Int cannot be cast to class objcTests.NSString", exception.message)
|
||||
}
|
||||
|
||||
val bundle35544: Any = NSBundle()
|
||||
@Test
|
||||
fun testKT35544runtime() {
|
||||
val exception = assertFailsWith<ClassCastException> {
|
||||
bundle35544 as NSString
|
||||
}
|
||||
assertEquals("class NSBundle cannot be cast to class objcTests.NSString", exception.message)
|
||||
}
|
||||
Reference in New Issue
Block a user