Test for compilerOpts in cinterop part of MPP plugin (#2300)
This commit is contained in:
+1
@@ -34,6 +34,7 @@ kotlin {
|
||||
stdio {
|
||||
packageName 'example.cinterop.project.stdio'
|
||||
extraOpts '-nodefaultlibs'
|
||||
compilerOpts '-DEVEN_NUMBER'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+10
@@ -1,2 +1,12 @@
|
||||
headers = stdio.h
|
||||
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
|
||||
|
||||
import kotlin.test.*
|
||||
import example.cinterop.project.stdio.*
|
||||
|
||||
@Test
|
||||
fun projectTest() {
|
||||
projectPrint("Project test")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun compilerOptsTest() {
|
||||
assertEquals(2, getNumber())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user