[ObjCExport] Initial implementation of function type translation
^KT-65167
This commit is contained in:
committed by
Space Team
parent
3766a5f2ad
commit
c958aef679
+23
@@ -69,6 +69,29 @@ class ObjCExportTypeTranslationTest(
|
||||
assertEquals("A *, B * _Nullable -> C * _Nullable", header.renderTypesOfSymbol("foo"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - Unit as return type`() {
|
||||
val header = header(
|
||||
"""
|
||||
fun foo() = Unit
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
assertEquals(" -> void", header.renderTypesOfSymbol("foo"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - Unit as parameter type`() {
|
||||
val header = header(
|
||||
"""
|
||||
fun foo(unit: Unit) = Unit
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
assertEquals("Unit * -> void", header.renderTypesOfSymbol("foo"))
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
fun `test - hiddenTypes - Any - are exposed as id`() {
|
||||
val header = header("""fun foo(): Any""")
|
||||
|
||||
Reference in New Issue
Block a user