New J2K: add multi-file conversion tests from old j2k

This commit is contained in:
Ilya Kirillov
2019-10-09 17:20:46 +03:00
parent f951ed9dba
commit 999918d499
60 changed files with 862 additions and 1 deletions
@@ -0,0 +1,22 @@
package test;
class ClassWithStatics {
public void instanceMethod() {
}
public static void staticMethod(int p) {
}
public static final int staticField = 1;
public static int staticNonFinalField = 1;
protected static int ourValue = 0;
public static int getValue() {
return ourValue;
}
public static void setValue(int value) {
ourValue = value;
}
}
@@ -0,0 +1,15 @@
package test
internal open class ClassWithStatics {
fun instanceMethod() {}
companion object {
@JvmStatic
fun staticMethod(p: Int) {}
const val staticField = 1
@JvmField
var staticNonFinalField = 1
var value = 0
}
}
@@ -0,0 +1,21 @@
package test;
class C {
void foo(ClassWithStatics c) {
ClassWithStatics.staticMethod(ClassWithStatics.staticField);
c.instanceMethod();
ClassWithStatics.staticNonFinalField += 2;
}
void methodReferences() {
Object staticMethod = ClassWithStatics::staticMethod;
Object instanceMethod = ClassWithStatics::instanceMethod;
}
}
class D extends ClassWithStatics {
void foo() {
staticMethod(staticField);
ourValue *= 2;
}
}
@@ -0,0 +1,21 @@
package test;
class C {
void foo(ClassWithStatics c) {
ClassWithStatics.staticMethod(ClassWithStatics.staticField);
c.instanceMethod();
ClassWithStatics.staticNonFinalField += 2;
}
void methodReferences() {
Object staticMethod = ClassWithStatics::staticMethod;
Object instanceMethod = ClassWithStatics::instanceMethod;
}
}
class D extends ClassWithStatics {
void foo() {
staticMethod(staticField);
value *= 2;
}
}
@@ -0,0 +1,5 @@
package test
fun foo() {
ClassWithStatics.staticMethod(ClassWithStatics.staticField)
}
@@ -0,0 +1,5 @@
package test
fun foo() {
ClassWithStatics.staticMethod(ClassWithStatics.staticField)
}