Merge boxWithJava testData into box, delete BoxWithJava test
This commit is contained in:
committed by
Alexander Udalov
parent
16a0ddd2fb
commit
f8dfaf4599
+29
@@ -0,0 +1,29 @@
|
||||
// FILE: Test.java
|
||||
|
||||
public class Test {
|
||||
public static String invokeFoo() {
|
||||
try {
|
||||
ExtensionKt.foo(null);
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
try {
|
||||
ExtensionKt.getBar(null);
|
||||
}
|
||||
catch (IllegalArgumentException f) {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
|
||||
return "Fail: assertion must have been fired";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: extension.kt
|
||||
|
||||
fun Any.foo() { }
|
||||
|
||||
val Any.bar: String get() = ""
|
||||
|
||||
fun box(): String {
|
||||
return Test.invokeFoo()
|
||||
}
|
||||
Reference in New Issue
Block a user