Split GenerateNotNullAssertionsTests into standard box and bytecode tests
This commit is contained in:
committed by
Alexander Udalov
parent
dfd0042a5b
commit
dd20b74030
+28
@@ -0,0 +1,28 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// FILE: Test.java
|
||||
|
||||
public class Test {
|
||||
public static void callFoo() {
|
||||
new A().foo(null);
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Test.kt
|
||||
|
||||
class A {
|
||||
fun foo(s: String) {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
Test.callFoo()
|
||||
return "Fail 1"
|
||||
} catch (e : IllegalArgumentException) {
|
||||
if (e.message != "Parameter specified as non-null is null: method A.foo, parameter s") {
|
||||
return "Fail 2 (message: ${e.message})"
|
||||
}
|
||||
} catch (e : Throwable) {
|
||||
return "Fail 3 (exception class: ${e::class.simpleName})"
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user