72aa3d1465
- move some of boxWithStdlib tests under fullJdk/ directory, where they will be compiled against the full JDK - introduce FULL_JDK in-text directive for the reflection test as only 4 tests out of 654 needed the full JDK
34 lines
834 B
Kotlin
Vendored
34 lines
834 B
Kotlin
Vendored
package foo
|
|
|
|
import kotlin.jvm.*
|
|
import kotlin.platform.*
|
|
|
|
class WithNative {
|
|
companion object {
|
|
platformStatic native fun bar(l: Long, s: String): Double
|
|
}
|
|
}
|
|
|
|
object ObjWithNative {
|
|
platformStatic native fun bar(l: Long, s: String): Double
|
|
}
|
|
|
|
fun box(): String {
|
|
var d = 0.0
|
|
try {
|
|
d = WithNative.bar(1, "")
|
|
return "Link error expected"
|
|
}
|
|
catch (e: java.lang.UnsatisfiedLinkError) {
|
|
if (e.getMessage() != "foo.WithNative.bar(JLjava/lang/String;)D") return "Fail 1: " + e.getMessage()
|
|
}
|
|
|
|
try {
|
|
d = ObjWithNative.bar(1, "")
|
|
return "Link error expected on object"
|
|
}
|
|
catch (e: java.lang.UnsatisfiedLinkError) {
|
|
if (e.getMessage() != "foo.ObjWithNative.bar(JLjava/lang/String;)D") return "Fail 2: " + e.getMessage()
|
|
}
|
|
return "OK"
|
|
} |