Migrate boxAgainstJava tests to multi-file framework
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
// FILE: JavaClass.java
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class JavaClass {
|
||||
public static void sortIntList(List<Integer> list, Comparator<Integer> comparator) {
|
||||
Collections.sort(list, comparator);
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
import java.util.*
|
||||
|
||||
fun box(): String {
|
||||
@@ -5,4 +17,4 @@ fun box(): String {
|
||||
val expected = ArrayList(Arrays.asList(8, 5, 4, 3, 2, 1))
|
||||
JavaClass.sortIntList(list, { a, b -> b - a })
|
||||
return if (list == expected) "OK" else list.toString()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user