[ObjCExport] Add suspend function and @Throws tests
KT-66115, KT-66239
This commit is contained in:
committed by
Space Team
parent
ac1f664a65
commit
1f49e01f1a
+15
-1
@@ -137,7 +137,6 @@ class ObjCExportHeaderGeneratorTest(private val generator: HeaderGenerator) {
|
||||
}
|
||||
|
||||
@Test
|
||||
@TodoAnalysisApi
|
||||
fun `test - functionWithThrowsAnnotation`() {
|
||||
doTest(headersTestDataDir.resolve("functionWithThrowsAnnotation"))
|
||||
}
|
||||
@@ -340,6 +339,21 @@ class ObjCExportHeaderGeneratorTest(private val generator: HeaderGenerator) {
|
||||
doTest(headersTestDataDir.resolve("privateGenericSuperInterface"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - throwable`() {
|
||||
doTest(headersTestDataDir.resolve("throwable"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - illegalStateException`() {
|
||||
doTest(headersTestDataDir.resolve("illegalStateException"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - suspend function`() {
|
||||
doTest(headersTestDataDir.resolve("suspendFunction"))
|
||||
}
|
||||
|
||||
private fun doTest(root: File, configuration: Configuration = Configuration()) {
|
||||
if (!root.isDirectory) fail("Expected ${root.absolutePath} to be directory")
|
||||
val generatedHeaders = generator.generateHeaders(root, configuration).toString()
|
||||
|
||||
Reference in New Issue
Block a user