mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
Remove codegen tests with Java, move testData to boxWithJava/
There'll be a single generated test class like BlackBoxCodegenTestGenerated
This commit is contained in:
committed by
Alexander Udalov
parent
10c5949199
commit
86938f57b1
@@ -0,0 +1,5 @@
|
||||
package test;
|
||||
|
||||
public enum simpleJavaEnum {
|
||||
A;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import test.*
|
||||
|
||||
fun box() =
|
||||
if (simpleJavaEnum.A.toString() == "A") "OK"
|
||||
else "fail"
|
||||
@@ -0,0 +1,18 @@
|
||||
package test;
|
||||
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
|
||||
public enum simpleJavaEnumWithFunction {
|
||||
A {
|
||||
@Override
|
||||
public String repr() {
|
||||
return "A";
|
||||
}
|
||||
},
|
||||
B;
|
||||
|
||||
public String repr() {
|
||||
return "ololol" + toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import test.simpleJavaEnumWithFunction.*
|
||||
|
||||
fun box() =
|
||||
if (A.repr() == "A" && B.repr() == "olololB") "OK"
|
||||
else "fail"
|
||||
@@ -0,0 +1,5 @@
|
||||
package test;
|
||||
|
||||
public enum simpleJavaEnumWithStaticImport {
|
||||
A;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import test.simpleJavaEnumWithStaticImport.A
|
||||
|
||||
fun box() =
|
||||
if (A.toString() == "A") "OK"
|
||||
else "fail"
|
||||
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
public class simpleJavaInnerEnum {
|
||||
public enum MyEnum {
|
||||
A;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import test.*
|
||||
import test.simpleJavaInnerEnum.MyEnum.A
|
||||
|
||||
fun box() =
|
||||
if (simpleJavaInnerEnum.MyEnum.A.toString() == "A" && A.toString() == "A") "OK"
|
||||
else "fail"
|
||||
Reference in New Issue
Block a user