Minor, add test on Java enum with specialized entry

This commit is contained in:
Alexander Udalov
2015-04-02 18:53:50 +03:00
parent 3c1ead726b
commit 6279421094
8 changed files with 99 additions and 24 deletions
@@ -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)
@@ -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)