Migrate boxAgainstJava tests to multi-file framework

This commit is contained in:
Alexander Udalov
2016-03-01 16:28:53 +03:00
parent 26de87d792
commit 280ad195ee
251 changed files with 2010 additions and 1399 deletions
@@ -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" })