Minor, add test on Java enum with specialized entry
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package test;
|
||||
|
||||
public enum EnumWithSpecializedEntry {
|
||||
E1,
|
||||
|
||||
E2 {
|
||||
String foo() {
|
||||
return name();
|
||||
}
|
||||
};
|
||||
|
||||
static class Nested {}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package test
|
||||
|
||||
public open enum class EnumWithSpecializedEntry : kotlin.Enum<test.EnumWithSpecializedEntry!> {
|
||||
public enum entry E1 : test.EnumWithSpecializedEntry {
|
||||
private constructor E1()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.EnumWithSpecializedEntry!): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
|
||||
public enum entry E2 : test.EnumWithSpecializedEntry {
|
||||
private constructor E2()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.EnumWithSpecializedEntry!): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
}
|
||||
|
||||
private constructor EnumWithSpecializedEntry()
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: test.EnumWithSpecializedEntry!): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun name(): kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ fun ordinal(): kotlin.Int
|
||||
|
||||
public/*package*/ open class Nested {
|
||||
public/*package*/ constructor Nested()
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): test.EnumWithSpecializedEntry
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<test.EnumWithSpecializedEntry>
|
||||
}
|
||||
@@ -45,6 +45,7 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
@InnerTestClasses({
|
||||
CompiledJava.Annotations.class,
|
||||
CompiledJava.Constructor.class,
|
||||
CompiledJava.Enum.class,
|
||||
CompiledJava.JavaBean.class,
|
||||
CompiledJava.KotlinSignature.class,
|
||||
CompiledJava.Library.class,
|
||||
@@ -119,12 +120,6 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
doTestCompiledJava(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("EnumMembers.java")
|
||||
public void testEnumMembers() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/EnumMembers.java");
|
||||
doTestCompiledJava(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("FieldAsVar.java")
|
||||
public void testFieldAsVar() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldAsVar.java");
|
||||
@@ -179,12 +174,6 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
doTestCompiledJava(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("JavaEnum.java")
|
||||
public void testJavaEnum() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/JavaEnum.java");
|
||||
doTestCompiledJava(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MethodReferencesOuterClassTP.java")
|
||||
public void testMethodReferencesOuterClassTP() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java");
|
||||
@@ -503,6 +492,33 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/enum")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Enum extends AbstractLoadJavaTest {
|
||||
public void testAllFilesPresentInEnum() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/enum"), Pattern.compile("^(.+)\\.java$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("EnumMembers.java")
|
||||
public void testEnumMembers() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumMembers.java");
|
||||
doTestCompiledJava(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("EnumWithSpecializedEntry.java")
|
||||
public void testEnumWithSpecializedEntry() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.java");
|
||||
doTestCompiledJava(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("JavaEnum.java")
|
||||
public void testJavaEnum() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/JavaEnum.java");
|
||||
doTestCompiledJava(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/javaBean")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+28
-12
@@ -3094,6 +3094,7 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
|
||||
@InnerTestClasses({
|
||||
CompiledJava.Annotations.class,
|
||||
CompiledJava.Constructor.class,
|
||||
CompiledJava.Enum.class,
|
||||
CompiledJava.JavaBean.class,
|
||||
CompiledJava.KotlinSignature.class,
|
||||
CompiledJava.Library.class,
|
||||
@@ -3167,12 +3168,6 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("EnumMembers.java")
|
||||
public void testEnumMembers() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/EnumMembers.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("FieldAsVar.java")
|
||||
public void testFieldAsVar() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldAsVar.java");
|
||||
@@ -3227,12 +3222,6 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("JavaEnum.java")
|
||||
public void testJavaEnum() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/JavaEnum.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MethodReferencesOuterClassTP.java")
|
||||
public void testMethodReferencesOuterClassTP() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java");
|
||||
@@ -3551,6 +3540,33 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/enum")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Enum extends AbstractJvmRuntimeDescriptorLoaderTest {
|
||||
public void testAllFilesPresentInEnum() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/enum"), Pattern.compile("^(.+)\\.java$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("EnumMembers.java")
|
||||
public void testEnumMembers() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumMembers.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("EnumWithSpecializedEntry.java")
|
||||
public void testEnumWithSpecializedEntry() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("JavaEnum.java")
|
||||
public void testJavaEnum() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/JavaEnum.java");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava/compiledJava/javaBean")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user