Test for compilerOpts in cinterop part of MPP plugin (#2300)
This commit is contained in:
+1
@@ -34,6 +34,7 @@ kotlin {
|
|||||||
stdio {
|
stdio {
|
||||||
packageName 'example.cinterop.project.stdio'
|
packageName 'example.cinterop.project.stdio'
|
||||||
extraOpts '-nodefaultlibs'
|
extraOpts '-nodefaultlibs'
|
||||||
|
compilerOpts '-DEVEN_NUMBER'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -1,2 +1,12 @@
|
|||||||
headers = stdio.h
|
headers = stdio.h
|
||||||
compilerOpts.osx = -D_ANSI_SOURCE
|
compilerOpts.osx = -D_ANSI_SOURCE
|
||||||
|
---
|
||||||
|
|
||||||
|
int getNumber()
|
||||||
|
{
|
||||||
|
#ifdef EVEN_NUMBER
|
||||||
|
return 2;
|
||||||
|
#else
|
||||||
|
return 1;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
+6
@@ -5,8 +5,14 @@
|
|||||||
package example.cinterop.project
|
package example.cinterop.project
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
import example.cinterop.project.stdio.*
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun projectTest() {
|
fun projectTest() {
|
||||||
projectPrint("Project test")
|
projectPrint("Project test")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun compilerOptsTest() {
|
||||||
|
assertEquals(2, getNumber())
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user