Add tests for type enhancement uncluding with compiled java
This commit is contained in:
+60
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.checkers;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class ForeignAnnotationsCompiledJavaDiagnosticTestGenerated extends AbstractForeignAnnotationsCompiledJavaDiagnosticTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInTypeEnhancementOnCompiledJava() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBound.kt")
|
||||
public void testClassTypeParameterBound() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBoundWithWarnings.kt")
|
||||
public void testClassTypeParameterBoundWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnType.kt")
|
||||
public void testReturnType() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnTypeWithWarnings.kt")
|
||||
public void testReturnTypeWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ValueParameter.kt")
|
||||
public void testValueParameter() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ValueParameterWithWarnings.kt")
|
||||
public void testValueParameterWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt");
|
||||
}
|
||||
}
|
||||
+43
@@ -129,4 +129,47 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated extends
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class TypeEnhancementOnCompiledJava extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInTypeEnhancementOnCompiledJava() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBound.kt")
|
||||
public void testClassTypeParameterBound() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBoundWithWarnings.kt")
|
||||
public void testClassTypeParameterBoundWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnType.kt")
|
||||
public void testReturnType() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnTypeWithWarnings.kt")
|
||||
public void testReturnTypeWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ValueParameter.kt")
|
||||
public void testValueParameter() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ValueParameterWithWarnings.kt")
|
||||
public void testValueParameterWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+43
@@ -129,4 +129,47 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTe
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class TypeEnhancementOnCompiledJava extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInTypeEnhancementOnCompiledJava() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBound.kt")
|
||||
public void testClassTypeParameterBound() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBoundWithWarnings.kt")
|
||||
public void testClassTypeParameterBoundWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnType.kt")
|
||||
public void testReturnType() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnTypeWithWarnings.kt")
|
||||
public void testReturnTypeWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ValueParameter.kt")
|
||||
public void testValueParameter() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ValueParameterWithWarnings.kt")
|
||||
public void testValueParameterWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+43
@@ -129,4 +129,47 @@ public class ForeignJava8AnnotationsTestGenerated extends AbstractForeignJava8An
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class TypeEnhancementOnCompiledJava extends AbstractForeignJava8AnnotationsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInTypeEnhancementOnCompiledJava() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBound.kt")
|
||||
public void testClassTypeParameterBound() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBoundWithWarnings.kt")
|
||||
public void testClassTypeParameterBoundWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnType.kt")
|
||||
public void testReturnType() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnTypeWithWarnings.kt")
|
||||
public void testReturnTypeWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ValueParameter.kt")
|
||||
public void testValueParameter() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ValueParameterWithWarnings.kt")
|
||||
public void testValueParameterWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+43
@@ -129,4 +129,47 @@ public class JavacForeignJava8AnnotationsTestGenerated extends AbstractJavacFore
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class TypeEnhancementOnCompiledJava extends AbstractJavacForeignJava8AnnotationsTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInTypeEnhancementOnCompiledJava() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBound.kt")
|
||||
public void testClassTypeParameterBound() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBoundWithWarnings.kt")
|
||||
public void testClassTypeParameterBoundWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnType.kt")
|
||||
public void testReturnType() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ReturnTypeWithWarnings.kt")
|
||||
public void testReturnTypeWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ValueParameter.kt")
|
||||
public void testValueParameter() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ValueParameterWithWarnings.kt")
|
||||
public void testValueParameterWithWarnings() throws Exception {
|
||||
runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
@@ -62,6 +62,11 @@ public class LoadJava8TestGenerated extends AbstractLoadJava8Test {
|
||||
public void testBasic() throws Exception {
|
||||
runTest("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations/Basic.java");
|
||||
}
|
||||
|
||||
@TestMetadata("Basic_DisabledImprovements.java")
|
||||
public void testBasic_DisabledImprovements() throws Exception {
|
||||
runTest("compiler/testData/loadJava8/compiledJava/typeParameterAnnotations/Basic_DisabledImprovements.java");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava8/compiledJava/typeUseAnnotations")
|
||||
@@ -86,6 +91,11 @@ public class LoadJava8TestGenerated extends AbstractLoadJava8Test {
|
||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic.java");
|
||||
}
|
||||
|
||||
@TestMetadata("Basic_DisabledImprovements.java")
|
||||
public void testBasic_DisabledImprovements() throws Exception {
|
||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/Basic_DisabledImprovements.java");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBounds.java")
|
||||
public void testClassTypeParameterBounds() throws Exception {
|
||||
runTest("compiler/testData/loadJava8/compiledJava/typeUseAnnotations/ClassTypeParameterBounds.java");
|
||||
@@ -151,6 +161,11 @@ public class LoadJava8TestGenerated extends AbstractLoadJava8Test {
|
||||
public void testBasic() throws Exception {
|
||||
runTest("compiler/testData/loadJava8/sourceJava/typeParameterAnnotations/Basic.java");
|
||||
}
|
||||
|
||||
@TestMetadata("Basic_DisabledImprovements.java")
|
||||
public void testBasic_DisabledImprovements() throws Exception {
|
||||
runTest("compiler/testData/loadJava8/sourceJava/typeParameterAnnotations/Basic_DisabledImprovements.java");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/loadJava8/sourceJava/typeUseAnnotations")
|
||||
@@ -175,6 +190,11 @@ public class LoadJava8TestGenerated extends AbstractLoadJava8Test {
|
||||
runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/Basic.java");
|
||||
}
|
||||
|
||||
@TestMetadata("Basic_DisabledImprovements.java")
|
||||
public void testBasic_DisabledImprovements() throws Exception {
|
||||
runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/Basic_DisabledImprovements.java");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassTypeParameterBounds.java")
|
||||
public void testClassTypeParameterBounds() throws Exception {
|
||||
runTest("compiler/testData/loadJava8/sourceJava/typeUseAnnotations/ClassTypeParameterBounds.java");
|
||||
|
||||
Reference in New Issue
Block a user