Rename tests: boxWithJava -> boxAgainstJava
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
public A() {}
|
||||
|
||||
public A(String x) {}
|
||||
|
||||
public A(long l, double z) {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fun box(): String {
|
||||
A()
|
||||
A("")
|
||||
A(0.toLong(), 0.0)
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import java.util.*;
|
||||
|
||||
public class max {
|
||||
public static <T extends Object & Comparable<? super T>> T max(Collection<? extends T> coll) {
|
||||
return Collections.max(coll);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun box(): String {
|
||||
return max.max(java.util.Arrays.asList("AK", "OK", "EK"))!!
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class R {
|
||||
public static class id {
|
||||
public static final int main = 17;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fun box() =
|
||||
if (R.id.main == 17) "OK" else "fail"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class R {
|
||||
public static class id {
|
||||
public static class zzz {
|
||||
public static final int main = 17;
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
fun box() =
|
||||
if (R.id.zzz.main == 17) "OK" else "fail"
|
||||
@@ -0,0 +1,7 @@
|
||||
import java.util.Collection;
|
||||
|
||||
public class unrelatedUpperBounds {
|
||||
public static <T extends CharSequence & java.io.Serializable> T id(T p) {
|
||||
return p;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun box(): String {
|
||||
return unrelatedUpperBounds.id("OK" as java.lang.String)!! as kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user