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
+21
View File
@@ -0,0 +1,21 @@
package test;
public class AAA {
private int x = 42;
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public void foo() {
setX(getX() + 1);
}
public void bar(B b) {
System.out.println(b.getYY());
}
}
+14
View File
@@ -0,0 +1,14 @@
// ERROR: Unresolved reference: yy
package test
class AAA {
var x = 42
fun foo() {
x = x + 1
}
fun bar(b: B) {
println(b.yy)
}
}
+14
View File
@@ -0,0 +1,14 @@
package test;
public class B {
void foo(AAA a) {
a.setX(a.getX() + 1);
y += "a";
}
private String y = "";
public String getYY() {
return y;
}
}
+11
View File
@@ -0,0 +1,11 @@
package test
class B {
fun foo(a: AAA) {
a.x = a.x + 1
yY += "a"
}
var yY = ""
private set
}
@@ -0,0 +1,13 @@
import test.AAA
fun foo1(a: AAA) {
a.setX(a.getX() + 1)
}
fun foo2(a: AAA?) {
a?.setX((a?.getX() ?: 0) + 1)
}
fun AAA.foo() {
setX(getX() + 1)
}
@@ -0,0 +1,13 @@
import test.AAA
fun foo1(a: AAA) {
a.x = a.x + 1
}
fun foo2(a: AAA?) {
a?.x = (a?.x ?: 0) + 1
}
fun AAA.foo() {
x = x + 1
}
@@ -0,0 +1,7 @@
package test;
class JavaClass {
void foo(AAA a) {
a.setX(a.getX() + 1);
}
}
@@ -0,0 +1,7 @@
package test;
class JavaClass {
void foo(AAA a) {
a.x = a.x + 1;
}
}