[Jspecify] Move diagnostic tests against compiled java under the new tests infrastructure

This commit is contained in:
Victor Petukhov
2021-04-05 18:04:27 +03:00
parent 8f097b14cc
commit 6065f0e2d0
4 changed files with 3 additions and 107 deletions
@@ -1,61 +0,0 @@
/*
* Copyright 2010-2021 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.util.KtTestUtil;
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/foreignAnnotations/java8Tests/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 {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("ClassTypeParameterBound.kt")
public void testClassTypeParameterBound() throws Exception {
runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt");
}
@TestMetadata("ClassTypeParameterBoundWithWarnings.kt")
public void testClassTypeParameterBoundWithWarnings() throws Exception {
runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt");
}
@TestMetadata("ReturnType.kt")
public void testReturnType() throws Exception {
runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnType.kt");
}
@TestMetadata("ReturnTypeWithWarnings.kt")
public void testReturnTypeWithWarnings() throws Exception {
runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt");
}
@TestMetadata("ValueParameter.kt")
public void testValueParameter() throws Exception {
runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameter.kt");
}
@TestMetadata("ValueParameterWithWarnings.kt")
public void testValueParameterWithWarnings() throws Exception {
runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt");
}
}
@@ -28,10 +28,6 @@ fun main(args: Array<String>) {
generateTestGroupSuite(args) {
testGroup("compiler/tests-java8/tests", "compiler/testData") {
testClass<AbstractForeignAnnotationsCompiledJavaDiagnosticTest> {
model("foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava")
}
testClass<AbstractLoadJava8Test> {
model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava")
model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava")