Exclude tests for loading type use annotations and type enhancement based on them to pass using javac and psi class files reading
This commit is contained in:
+18
-3
@@ -58,12 +58,27 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractLoadJava8UsingJavacTest> {
|
testClass<AbstractLoadJava8UsingJavacTest> {
|
||||||
model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
|
model(
|
||||||
model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava")
|
"loadJava8/compiledJava",
|
||||||
|
extension = "java",
|
||||||
|
testMethod = "doTestCompiledJava",
|
||||||
|
excludeDirs = listOf("typeUseAnnotations", "typeParameterAnnotations")
|
||||||
|
)
|
||||||
|
model(
|
||||||
|
"loadJava8/sourceJava",
|
||||||
|
extension = "java",
|
||||||
|
testMethod = "doTestSourceJava",
|
||||||
|
excludeDirs = listOf("typeUseAnnotations", "typeParameterAnnotations")
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractLoadJava8WithPsiClassReadingTest> {
|
testClass<AbstractLoadJava8WithPsiClassReadingTest> {
|
||||||
model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
|
model(
|
||||||
|
"loadJava8/compiledJava",
|
||||||
|
extension = "java",
|
||||||
|
testMethod = "doTestCompiledJava",
|
||||||
|
excludeDirs = listOf("typeUseAnnotations", "typeParameterAnnotations")
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractEnhancedSignaturesResolvedCallsTest> {
|
testClass<AbstractEnhancedSignaturesResolvedCallsTest> {
|
||||||
|
|||||||
+1
-67
@@ -26,7 +26,7 @@ public class LoadJava8WithPsiClassReadingTestGenerated extends AbstractLoadJava8
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInCompiledJava() throws Exception {
|
public void testAllFilesPresentInCompiledJava() throws Exception {
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), null, true, "typeUseAnnotations", "typeParameterAnnotations");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("InnerClassTypeAnnotation.java")
|
@TestMetadata("InnerClassTypeAnnotation.java")
|
||||||
@@ -43,70 +43,4 @@ public class LoadJava8WithPsiClassReadingTestGenerated extends AbstractLoadJava8
|
|||||||
public void testParameterNames() throws Exception {
|
public void testParameterNames() throws Exception {
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/ParameterNames.java");
|
runTest("compiler/testData/loadJava8/compiledJava/ParameterNames.java");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class TypeParameterAnnotations extends AbstractLoadJava8WithPsiClassReadingTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInTypeParameterAnnotations() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("Basic.java")
|
|
||||||
public void testBasic() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations/Basic.java");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/loadJava8/compiledJava/typeUseAnnotations")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class TypeUseAnnotations extends AbstractLoadJava8WithPsiClassReadingTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInTypeUseAnnotations() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava/typeUseAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("BaseClassTypeArguments.java")
|
|
||||||
public void testBaseClassTypeArguments() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/BaseClassTypeArguments.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("Basic.java")
|
|
||||||
public void testBasic() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("ClassTypeParameterBounds.java")
|
|
||||||
public void testClassTypeParameterBounds() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ClassTypeParameterBounds.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MethodReceiver.java")
|
|
||||||
public void testMethodReceiver() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodReceiver.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MethodTypeParameterBounds.java")
|
|
||||||
public void testMethodTypeParameterBounds() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodTypeParameterBounds.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("ReturnType.java")
|
|
||||||
public void testReturnType() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ReturnType.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("ValueArguments.java")
|
|
||||||
public void testValueArguments() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ValueArguments.java");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-134
@@ -28,7 +28,7 @@ public class LoadJava8UsingJavacTestGenerated extends AbstractLoadJava8UsingJava
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInCompiledJava() throws Exception {
|
public void testAllFilesPresentInCompiledJava() throws Exception {
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), null, true, "typeUseAnnotations", "typeParameterAnnotations");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("InnerClassTypeAnnotation.java")
|
@TestMetadata("InnerClassTypeAnnotation.java")
|
||||||
@@ -45,72 +45,6 @@ public class LoadJava8UsingJavacTestGenerated extends AbstractLoadJava8UsingJava
|
|||||||
public void testParameterNames() throws Exception {
|
public void testParameterNames() throws Exception {
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/ParameterNames.java");
|
runTest("compiler/testData/loadJava8/compiledJava/ParameterNames.java");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class TypeParameterAnnotations extends AbstractLoadJava8UsingJavacTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInTypeParameterAnnotations() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("Basic.java")
|
|
||||||
public void testBasic() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations/Basic.java");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/loadJava8/compiledJava/typeUseAnnotations")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class TypeUseAnnotations extends AbstractLoadJava8UsingJavacTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTestCompiledJava, this, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInTypeUseAnnotations() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/compiledJava/typeUseAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("BaseClassTypeArguments.java")
|
|
||||||
public void testBaseClassTypeArguments() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/BaseClassTypeArguments.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("Basic.java")
|
|
||||||
public void testBasic() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("ClassTypeParameterBounds.java")
|
|
||||||
public void testClassTypeParameterBounds() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ClassTypeParameterBounds.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MethodReceiver.java")
|
|
||||||
public void testMethodReceiver() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodReceiver.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MethodTypeParameterBounds.java")
|
|
||||||
public void testMethodTypeParameterBounds() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/MethodTypeParameterBounds.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("ReturnType.java")
|
|
||||||
public void testReturnType() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ReturnType.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("ValueArguments.java")
|
|
||||||
public void testValueArguments() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ValueArguments.java");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/loadJava8/sourceJava")
|
@TestMetadata("compiler/testData/loadJava8/sourceJava")
|
||||||
@@ -122,7 +56,7 @@ public class LoadJava8UsingJavacTestGenerated extends AbstractLoadJava8UsingJava
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInSourceJava() throws Exception {
|
public void testAllFilesPresentInSourceJava() throws Exception {
|
||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/sourceJava"), Pattern.compile("^(.+)\\.java$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/sourceJava"), Pattern.compile("^(.+)\\.java$"), null, true, "typeUseAnnotations", "typeParameterAnnotations");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("MapRemove.java")
|
@TestMetadata("MapRemove.java")
|
||||||
@@ -134,71 +68,5 @@ public class LoadJava8UsingJavacTestGenerated extends AbstractLoadJava8UsingJava
|
|||||||
public void testTypeParameterAnnotations() throws Exception {
|
public void testTypeParameterAnnotations() throws Exception {
|
||||||
runTest("compiler/testData/loadJava8/sourceJava/TypeParameterAnnotations.java");
|
runTest("compiler/testData/loadJava8/sourceJava/TypeParameterAnnotations.java");
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/loadJava8/sourceJava/typeParameterAnnotations")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class TypeParameterAnnotations extends AbstractLoadJava8UsingJavacTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTestSourceJava, this, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInTypeParameterAnnotations() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/sourceJava/typeParameterAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("Basic.java")
|
|
||||||
public void testBasic() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/sourceJava/typeParameterAnnotations/Basic.java");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/loadJava8/sourceJava/typeUseAnnotations")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class TypeUseAnnotations extends AbstractLoadJava8UsingJavacTest {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTestSourceJava, this, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInTypeUseAnnotations() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/loadJava8/sourceJava/typeUseAnnotations"), Pattern.compile("^(.+)\\.java$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("BaseClassTypeArguments.java")
|
|
||||||
public void testBaseClassTypeArguments() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/BaseClassTypeArguments.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("Basic.java")
|
|
||||||
public void testBasic() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/Basic.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("ClassTypeParameterBounds.java")
|
|
||||||
public void testClassTypeParameterBounds() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ClassTypeParameterBounds.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MethodReceiver.java")
|
|
||||||
public void testMethodReceiver() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/MethodReceiver.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MethodTypeParameterBounds.java")
|
|
||||||
public void testMethodTypeParameterBounds() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/MethodTypeParameterBounds.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("ReturnType.java")
|
|
||||||
public void testReturnType() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ReturnType.java");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("ValueArguments.java")
|
|
||||||
public void testValueArguments() throws Exception {
|
|
||||||
runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ValueArguments.java");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user