[ObjCExport] Add function with Char return type test
KT-65348
This commit is contained in:
committed by
Space Team
parent
fd33249c47
commit
7628d1a4aa
+16
@@ -176,6 +176,12 @@ class ObjCExportTypeTranslationTest(
|
|||||||
assertEquals("double", header.renderTypesOfSymbol("foo"))
|
assertEquals("double", header.renderTypesOfSymbol("foo"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `test - char`() {
|
||||||
|
val header = header("""val foo: Char get() = error("stub")""")
|
||||||
|
assertEquals("unichar", header.renderTypesOfSymbol("foo"))
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `test - string`() {
|
fun `test - string`() {
|
||||||
val header = header("""val foo: String get() = error("stub")""")
|
val header = header("""val foo: String get() = error("stub")""")
|
||||||
@@ -328,6 +334,16 @@ class ObjCExportTypeTranslationTest(
|
|||||||
assertEquals("C *(^)(A *, B *) -> void", header.renderTypesOfSymbol("foo"))
|
assertEquals("C *(^)(A *, B *) -> void", header.renderTypesOfSymbol("foo"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `test - function type returning char`() {
|
||||||
|
val header = header(
|
||||||
|
"""
|
||||||
|
val foo: () -> Char
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
|
||||||
|
assertEquals("id (^)(void)", header.renderTypesOfSymbol("foo"))
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `test - function type - receiver`() {
|
fun `test - function type - receiver`() {
|
||||||
|
|||||||
Reference in New Issue
Block a user