J2K, minor: fix testData

This commit is contained in:
Natalia Ukhorskaya
2016-03-28 15:52:05 +03:00
parent 1108fbfbeb
commit 29f385a713
4 changed files with 40 additions and 12 deletions
@@ -8,6 +8,6 @@ abstract class C {
int h = s2.hashCode(); int h = s2.hashCode();
} }
abstract void f(): String; abstract String f();
abstract void g(): String; abstract String g();
} }
@@ -3,9 +3,9 @@ internal abstract class C {
val s1 = f()!! val s1 = f()!!
val s2 = g() ?: error("g should not return null") val s2 = g() ?: error("g should not return null")
val h = s2.hashCode() val h = s2!!.hashCode()
} }
internal abstract fun f() internal abstract fun f(): String?
internal abstract fun g() internal abstract fun g(): String?
} }
+17 -3
View File
@@ -14,19 +14,33 @@ public class Test {
myIntProp = 1; myIntProp = 1;
} }
public void test() { public void test1() {
foo1(myProp); foo1(myProp);
foo2(myProp); }
foo3(myProp);
public void test2() {
foo2(myProp);
}
public void test3() {
foo3(myProp);
}
public void test4() {
myProp.charAt(myIntProp); myProp.charAt(myIntProp);
System.out.println(myProp); System.out.println(myProp);
}
public void test5() {
boolean b = "aaa".equals(myProp); boolean b = "aaa".equals(myProp);
String s = "aaa" + myProp; String s = "aaa" + myProp;
}
public void test6() {
myProp.compareToIgnoreCase(myProp); myProp.compareToIgnoreCase(myProp);
}
public void test7() {
List<Integer> list = new ArrayList<Integer>(); List<Integer> list = new ArrayList<Integer>();
list.remove(myIntProp); list.remove(myIntProp);
} }
+17 -3
View File
@@ -11,19 +11,33 @@ class Test {
myIntProp = 1 myIntProp = 1
} }
fun test() { fun test1() {
foo1(myProp!!) foo1(myProp!!)
foo2(myProp!!) }
foo3(myProp)
fun test2() {
foo2(myProp!!)
}
fun test3() {
foo3(myProp)
}
fun test4() {
myProp!![myIntProp!!] myProp!![myIntProp!!]
println(myProp) println(myProp)
}
fun test5() {
val b = "aaa" == myProp val b = "aaa" == myProp
val s = "aaa" + myProp!! val s = "aaa" + myProp!!
}
fun test6() {
myProp!!.compareTo(myProp!!, ignoreCase = true) myProp!!.compareTo(myProp!!, ignoreCase = true)
}
fun test7() {
val list = ArrayList<Int>() val list = ArrayList<Int>()
list.remove(myIntProp!!) list.remove(myIntProp!!)
} }