Migrate boxAgainstJava tests to multi-file framework
This commit is contained in:
+14
@@ -1,3 +1,17 @@
|
||||
// FILE: JavaClass.java
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class JavaClass {
|
||||
public static String findMaxAndInvokeCallback(Comparator<String> comparator, String a, String b, Runnable afterRunnable) {
|
||||
int compare = comparator.compare(a, b);
|
||||
afterRunnable.run();
|
||||
return compare > 0 ? a : b;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
fun box(): String {
|
||||
var v = "FAIL"
|
||||
val max = JavaClass.findMaxAndInvokeCallback({ a, b -> a.length - b.length }, "foo", "kotlin", { v = "OK" })
|
||||
|
||||
Reference in New Issue
Block a user