Added tests on link stage (disabled for now).

This commit is contained in:
Igor Chevdar
2017-03-27 11:28:02 +03:00
parent 6381b4d831
commit 00e452bcdf
4 changed files with 20 additions and 2 deletions
+9
View File
@@ -1541,6 +1541,15 @@ task deserialized_listof0(type: RunKonanTest) {
flags = ["--enable", "deserializer"]
}
// Enable when deserialization for default arguments is fixed.
task inline_defaultArgs_linkTest(type: LinkKonanTest) {
disabled = true
goldValue = "122\n47\n"
source = "codegen/inline/defaultArgs_linkTest_main.kt"
lib = "codegen/inline/defaultArgs_linkTest_lib.kt"
flags = ["--enable", "deserializer", "--print_ir", "--verbose", "deserializer", "--verbose", "lower_inline"]
}
kotlinNativeInterop {
sysstat {
pkg 'sysstat'
@@ -0,0 +1,3 @@
package a
inline fun foo(x: Int, y: Int = 117) = x + y
@@ -0,0 +1,6 @@
import a.*
fun main(args: Array<String>) {
println(foo(5))
println(foo(5, 42))
}
@@ -249,8 +249,8 @@ class LinkKonanTest extends KonanTest {
def libDir = project.file(lib).absolutePath
def libBc = "${libDir}.bc"
runCompiler(lib, libBc, ['-nolink'])
runCompiler(filesToCompile, exe, ['-library', libBc])
runCompiler(lib, libBc, ['-nolink'] + ((flags != null) ? flags :[]))
runCompiler(filesToCompile, exe, ['-library', libBc] + ((flags != null) ? flags :[]))
}
}