Test for compilerOpts in cinterop part of MPP plugin (#2300)

This commit is contained in:
LepilkinaElena
2019-05-13 12:05:33 +03:00
committed by GitHub
parent bb071263b0
commit f26a4e06bd
3 changed files with 17 additions and 0 deletions
@@ -34,6 +34,7 @@ kotlin {
stdio {
packageName 'example.cinterop.project.stdio'
extraOpts '-nodefaultlibs'
compilerOpts '-DEVEN_NUMBER'
}
}
}
@@ -1,2 +1,12 @@
headers = stdio.h
compilerOpts.osx = -D_ANSI_SOURCE
---
int getNumber()
{
#ifdef EVEN_NUMBER
return 2;
#else
return 1;
#endif
}
@@ -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())
}