Migrate boxAgainstJava tests to multi-file framework

This commit is contained in:
Alexander Udalov
2016-03-01 16:28:53 +03:00
parent 26de87d792
commit 280ad195ee
251 changed files with 2010 additions and 1399 deletions
@@ -1,5 +0,0 @@
package test;
public class genericConstructor<T extends Number> {
public genericConstructor(T number) {}
}
@@ -1,6 +1,16 @@
import test.genericConstructor
// FILE: test/Foo.java
class Subclass : genericConstructor<Int>(42) {
package test;
public class Foo<T extends Number> {
public Foo(T number) {}
}
// FILE: 1.kt
import test.Foo
class Subclass : Foo<Int>(42) {
}
fun box(): String {
@@ -1,24 +0,0 @@
package test;
public class secondaryConstructor {
private final String x;
private final String y;
public secondaryConstructor(String x, String y) {
this.x = x;
this.y = y;
}
public secondaryConstructor(String x) {
this(x, "def_y");
}
public secondaryConstructor() {
this("def_x");
}
@Override
public String toString() {
return x + "#" + y;
}
}
@@ -1,6 +1,35 @@
import test.secondaryConstructor;
// FILE: test/Foo.java
class Child : secondaryConstructor {
package test;
public class Foo {
private final String x;
private final String y;
public Foo(String x, String y) {
this.x = x;
this.y = y;
}
public Foo(String x) {
this(x, "def_y");
}
public Foo() {
this("def_x");
}
@Override
public String toString() {
return x + "#" + y;
}
}
// FILE: 1.kt
import test.Foo;
class Child : Foo {
constructor(): super() {}
constructor(x: String): super(x) {}
constructor(x: String, y: String): super(x, y) {}