Migrate all JDK 9 related tests to JDK 11

This commit is contained in:
Dmitriy Novozhilov
2021-09-22 17:21:53 +03:00
committed by TeamCityServer
parent ce3562f0e8
commit de7fb9606a
92 changed files with 284 additions and 306 deletions
@@ -31,10 +31,10 @@ object JvmPlatforms {
val defaultJvmPlatform: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.DEFAULT]!!
val jvm16: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_1_6]!!
val jvm18: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_1_8]!!
val jvm9: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_9]!!
val jvm15: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_15]!!
val jvm6: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_1_6]!!
val jvm8: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_1_8]!!
val jvm11: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_11]!!
val jvm17: TargetPlatform = jvmTargetToJdkPlatform[JvmTarget.JVM_17]!!
fun jvmPlatformByTargetVersion(targetVersion: JvmTarget): TargetPlatform =
jvmTargetToJdkPlatform[targetVersion]!!
@@ -964,181 +964,181 @@ public class FirOldFrontendForeignAnnotationsCompiledJavaTestGenerated extends A
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests")
@TestDataPath("$PROJECT_ROOT")
public class Java9Tests {
public class Java11Tests {
@Test
public void testAllFilesPresentInJava9Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
public void testAllFilesPresentInJava11Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
public class Jspecify {
@Test
public void testAllFilesPresentInJspecify() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations")
@TestDataPath("$PROJECT_ROOT")
public class ModuleAnnotations {
@Test
public void testAllFilesPresentInModuleAnnotations() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict")
@TestDataPath("$PROJECT_ROOT")
public class Strict {
@Test
public void testAllFilesPresentInStrict() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn")
@TestDataPath("$PROJECT_ROOT")
public class Warn {
@Test
public void testAllFilesPresentInWarn() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
}
}
}
@@ -964,181 +964,181 @@ public class FirOldFrontendForeignAnnotationsCompiledJavaWithPsiClassReadingTest
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests")
@TestDataPath("$PROJECT_ROOT")
public class Java9Tests {
public class Java11Tests {
@Test
public void testAllFilesPresentInJava9Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
public void testAllFilesPresentInJava11Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
public class Jspecify {
@Test
public void testAllFilesPresentInJspecify() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations")
@TestDataPath("$PROJECT_ROOT")
public class ModuleAnnotations {
@Test
public void testAllFilesPresentInModuleAnnotations() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict")
@TestDataPath("$PROJECT_ROOT")
public class Strict {
@Test
public void testAllFilesPresentInStrict() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn")
@TestDataPath("$PROJECT_ROOT")
public class Warn {
@Test
public void testAllFilesPresentInWarn() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
}
}
}
@@ -964,181 +964,181 @@ public class FirOldFrontendForeignAnnotationsSourceJavaTestGenerated extends Abs
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests")
@TestDataPath("$PROJECT_ROOT")
public class Java9Tests {
public class Java11Tests {
@Test
public void testAllFilesPresentInJava9Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
public void testAllFilesPresentInJava11Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
public class Jspecify {
@Test
public void testAllFilesPresentInJspecify() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations")
@TestDataPath("$PROJECT_ROOT")
public class ModuleAnnotations {
@Test
public void testAllFilesPresentInModuleAnnotations() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict")
@TestDataPath("$PROJECT_ROOT")
public class Strict {
@Test
public void testAllFilesPresentInStrict() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn")
@TestDataPath("$PROJECT_ROOT")
public class Warn {
@Test
public void testAllFilesPresentInWarn() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
}
}
}
@@ -6,5 +6,5 @@
package org.jetbrains.kotlin.test
enum class TestJavacVersion {
JAVAC_1_8, JAVAC_9
}
JAVAC_1_8, JAVAC_11
}
@@ -26,9 +26,6 @@ enum class TestJdkKind(val requiresSeparateProcess: Boolean = false) {
// JDK found at $JDK_16
FULL_JDK_6(requiresSeparateProcess = true),
// JDK found at $JDK_9
FULL_JDK_9(requiresSeparateProcess = true),
// JDK found at $JDK_11
FULL_JDK_11(requiresSeparateProcess = true),
@@ -140,11 +140,6 @@ public class KtTestUtil {
return getJdkHome("JDK_8", "JDK_18");
}
@NotNull
public static File getJdk9Home() {
return getJdkHome("JDK_9", "JDK_19");
}
@NotNull
public static File getJdk11Home() {
return getJdkHome("JDK_11");
@@ -25,8 +25,8 @@ enum class TargetPlatformEnum(val targetPlatform: TargetPlatform) {
),
JVM(JvmPlatforms.unspecifiedJvmPlatform),
JVM_1_6(JvmPlatforms.jvm16),
JVM_1_8(JvmPlatforms.jvm18),
JVM_1_6(JvmPlatforms.jvm6),
JVM_1_8(JvmPlatforms.jvm8),
JS(JsPlatforms.defaultJsPlatform),
Native(NativePlatforms.unspecifiedNativePlatform)
@@ -1,4 +1,4 @@
// JVM_TARGET: 9
// JVM_TARGET: 11
class A
inline class IC(val x: String)
@@ -42,4 +42,4 @@ fun box(a: String, b: String?, x: IC?) {
// .. but ir backend performs wise `toString-impl` call
// one in IC.toString() + one in concatenation
// 2 INVOKESTATIC IC.toString-impl
// 2 INVOKESTATIC IC.toString-impl
@@ -1,5 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
// JVM_TARGET: 9
// JVM_TARGET: 11
fun box() {
val z = "0"
@@ -1,5 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
// JVM_TARGET: 9
// JVM_TARGET: 11
fun box() {
val z = "0"
@@ -1,5 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
// JVM_TARGET: 9
// JVM_TARGET: 11
fun box() {
val z = "0"
val result = z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
@@ -16,4 +16,4 @@ fun box() {
}
// 2 INVOKEDYNAMIC makeConcatWithConstants
// 0 append
// 0 stringPlus
// 0 stringPlus
@@ -1,5 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
// JVM_TARGET: 9
// JVM_TARGET: 11
class A
inline fun test(s: (String) -> Unit) {
@@ -12,4 +12,4 @@ fun box(a: String, b: String?) {
// 1 INVOKEDYNAMIC makeConcatWithConstants
// 0 append
// 0 stringPlus
// 0 stringPlus
@@ -1,7 +1,7 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
// JVM_TARGET: 9
// JVM_TARGET: 11
data class A(val i: Int, val b: Byte, val c: Char, val s: Short, val f: Float, val d: Double, val bo: Boolean, val l: Long)
// 1 INVOKEDYNAMIC makeConcatWithConstants
// 1 INVOKEDYNAMIC makeConcatWithConstants\(IBCSFDZJ\)Ljava/lang/String;
// 1 "A\(i=\\u0001, b=\\u0001, c=\\u0001, s=\\u0001, f=\\u0001, d=\\u0001, bo=\\u0001, l=\\u0001\)"
// 1 "A\(i=\\u0001, b=\\u0001, c=\\u0001, s=\\u0001, f=\\u0001, d=\\u0001, bo=\\u0001, l=\\u0001\)"
@@ -1,5 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy
// JVM_TARGET: 9
// JVM_TARGET: 11
class A
inline fun test(s: (String) -> Unit) {
@@ -20,4 +20,4 @@ fun box(a: String, b: String?) {
// 0 INVOKEDYNAMIC makeConcatWithConstants
// 6 INVOKEDYNAMIC makeConcat
// 0 append
// 0 stringPlus
// 0 stringPlus
@@ -1,5 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy
// JVM_TARGET: 9
// JVM_TARGET: 11
fun box() {
val z = "0"
val result = z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z + z +
@@ -17,4 +17,4 @@ fun box() {
}
// 2 INVOKEDYNAMIC makeConcat
// 0 append
// 0 stringPlus
// 0 stringPlus
@@ -1,5 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy
// JVM_TARGET: 9
// JVM_TARGET: 11
data class A(val i: Int, val b: Byte, val c: Char, val s: Short, val f: Float, val d: Double, val bo: Boolean, val l: Long)
// 1 INVOKEDYNAMIC makeConcat
@@ -1,4 +1,4 @@
// JVM_TARGET: 9
// JVM_TARGET: 11
fun box(a: String, b: String?) {
val s = a + "\u0001" + 2.toChar() + 3.toChar() + 4L + b + 5.0 + 6F + '7' + b + "\u0002" + 1.toChar()
@@ -14,4 +14,4 @@ fun box(a: String, b: String?) {
// JVM_IR_TEMPLATES
// 1 "\\u0001\\u0002\\u00015.06.07\\u0001\\u0002"
// 1 "\\u0001\\u0002\\u00034"
// 1 "\\u0002\\u0001"
// 1 "\\u0002\\u0001"
@@ -1,4 +1,4 @@
// JVM_TARGET: 9
// JVM_TARGET: 11
data class A(val x: Unit)
fun test(): Unit {}
@@ -1,5 +1,5 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
// JVM_TARGET: 9
// JVM_TARGET: 11
fun box(a: String, b: String?) {
val sb = StringBuilder();
sb.append("123")
@@ -7,4 +7,4 @@ fun box(a: String, b: String?) {
// 0 INVOKEDYNAMIC makeConcatWithConstants
// 1 append
// 0 stringPlus
// 0 stringPlus
@@ -1,6 +1,6 @@
// KOTLIN_CONFIGURATION_FLAGS: STRING_CONCAT=indy-with-constants
// IGNORE_JAVA_ERRORS
// JVM_TARGET: 9
// JVM_TARGET: 11
// FILE: JavaClass.java
public class JavaClass {
+1 -1
View File
@@ -1,5 +1,5 @@
// FIR_IDENTICAL
// JDK_KIND: FULL_JDK_9
// JDK_KIND: FULL_JDK_11
// WITH_STDLIB
import java.util.stream.IntStream
@@ -964,181 +964,181 @@ public class ForeignAnnotationsCompiledJavaTestGenerated extends AbstractForeign
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests")
@TestDataPath("$PROJECT_ROOT")
public class Java9Tests {
public class Java11Tests {
@Test
public void testAllFilesPresentInJava9Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
public void testAllFilesPresentInJava11Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
public class Jspecify {
@Test
public void testAllFilesPresentInJspecify() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations")
@TestDataPath("$PROJECT_ROOT")
public class ModuleAnnotations {
@Test
public void testAllFilesPresentInModuleAnnotations() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict")
@TestDataPath("$PROJECT_ROOT")
public class Strict {
@Test
public void testAllFilesPresentInStrict() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn")
@TestDataPath("$PROJECT_ROOT")
public class Warn {
@Test
public void testAllFilesPresentInWarn() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
}
}
}
@@ -964,181 +964,181 @@ public class ForeignAnnotationsCompiledJavaWithPsiClassReadingTestGenerated exte
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests")
@TestDataPath("$PROJECT_ROOT")
public class Java9Tests {
public class Java11Tests {
@Test
public void testAllFilesPresentInJava9Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
public void testAllFilesPresentInJava11Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
public class Jspecify {
@Test
public void testAllFilesPresentInJspecify() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations")
@TestDataPath("$PROJECT_ROOT")
public class ModuleAnnotations {
@Test
public void testAllFilesPresentInModuleAnnotations() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict")
@TestDataPath("$PROJECT_ROOT")
public class Strict {
@Test
public void testAllFilesPresentInStrict() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn")
@TestDataPath("$PROJECT_ROOT")
public class Warn {
@Test
public void testAllFilesPresentInWarn() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
}
}
}
@@ -964,181 +964,181 @@ public class ForeignAnnotationsSourceJavaTestGenerated extends AbstractForeignAn
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests")
@TestDataPath("$PROJECT_ROOT")
public class Java9Tests {
public class Java11Tests {
@Test
public void testAllFilesPresentInJava9Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
public void testAllFilesPresentInJava11Tests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify")
@TestDataPath("$PROJECT_ROOT")
public class Jspecify {
@Test
public void testAllFilesPresentInJspecify() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations")
@TestDataPath("$PROJECT_ROOT")
public class ModuleAnnotations {
@Test
public void testAllFilesPresentInModuleAnnotations() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict")
@TestDataPath("$PROJECT_ROOT")
public class Strict {
@Test
public void testAllFilesPresentInStrict() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/strict/severalModulesDifferentPackages.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn")
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn")
@TestDataPath("$PROJECT_ROOT")
public class Warn {
@Test
public void testAllFilesPresentInWarn() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("basic.kt")
public void testBasic() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/basic.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/basic.kt");
}
@Test
@TestMetadata("composeWithClassDefaultAnnotation.kt")
public void testComposeWithClassDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithClassDefaultAnnotation.kt");
}
@Test
@TestMetadata("composeWithPackageDefaultAnnotation.kt")
public void testComposeWithPackageDefaultAnnotation() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/composeWithPackageDefaultAnnotation.kt");
}
@Test
@TestMetadata("dependentModulesNoNullMarked.kt")
public void testDependentModulesNoNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNoNullMarked.kt");
}
@Test
@TestMetadata("dependentModulesNullMarked.kt")
public void testDependentModulesNullMarked() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dependentModulesNullMarked.kt");
}
@Test
@TestMetadata("dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt")
public void testDontPropagateModuleAnnotationToAnotherModuleWithSamePackage() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dontPropagateModuleAnnotationToAnotherModuleWithSamePackage.kt");
}
@Test
@TestMetadata("dotNamedModule.kt")
public void testDotNamedModule() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/dotNamedModule.kt");
}
@Test
@TestMetadata("inheritanceAcrossModules.kt")
public void testInheritanceAcrossModules() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/inheritanceAcrossModules.kt");
}
@Test
@TestMetadata("nestedClasses.kt")
public void testNestedClasses() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/nestedClasses.kt");
}
@Test
@TestMetadata("overrideAtDeclarationLevel.kt")
public void testOverrideAtDeclarationLevel() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/overrideAtDeclarationLevel.kt");
}
@Test
@TestMetadata("severalModulesDifferentPackages.kt")
public void testSeveralModulesDifferentPackages() throws Exception {
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
runTest("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/jspecify/moduleAnnotations/warn/severalModulesDifferentPackages.kt");
}
}
}
@@ -81,7 +81,7 @@ class JavaCompilerFacade(private val testServices: TestServices) {
val jdkHome = when (jvmTarget) {
JvmTarget.JVM_1_6 -> KtTestUtil.getJdk6Home()
JvmTarget.JVM_1_8 -> KtTestUtil.getJdk8Home()
JvmTarget.JVM_9 -> KtTestUtil.getJdk9Home()
JvmTarget.JVM_9,
JvmTarget.JVM_11 -> KtTestUtil.getJdk11Home()
JvmTarget.JVM_15,
JvmTarget.JVM_17 -> KtTestUtil.getJdk17Home()
@@ -92,11 +92,11 @@ abstract class AbstractForeignAnnotationsTestBase(private val kind: ForeignAnnot
}
}
forTestsMatching("compiler/testData/diagnostics/foreignAnnotationsTests/java9Tests/*") {
forTestsMatching("compiler/testData/diagnostics/foreignAnnotationsTests/java11Tests/*") {
defaultDirectives {
ANNOTATIONS_PATH with JavaForeignAnnotationType.Java9Annotations
JDK_KIND with TestJdkKind.FULL_JDK_9
COMPILE_JAVA_USING with TestJavacVersion.JAVAC_9
JDK_KIND with TestJdkKind.FULL_JDK_11
COMPILE_JAVA_USING with TestJavacVersion.JAVAC_11
}
}
}
@@ -166,9 +166,6 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
val jdk6 = System.getenv("JDK_16") ?: error("Environment variable JDK_16 is not set")
configuration.put(JVMConfigurationKeys.JDK_HOME, File(jdk6))
}
TestJdkKind.FULL_JDK_9 -> {
configuration.put(JVMConfigurationKeys.JDK_HOME, KtTestUtil.getJdk9Home())
}
TestJdkKind.FULL_JDK_11 -> {
configuration.put(JVMConfigurationKeys.JDK_HOME, KtTestUtil.getJdk11Home())
}
@@ -195,7 +192,7 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
module.javaFiles.filter { INCLUDE_JAVA_AS_BINARY in it.directives }
} else module.javaFiles
val useJava9ToCompileIncludedJavaFiles = javaVersionToCompile == TestJavacVersion.JAVAC_9
val useJava11ToCompileIncludedJavaFiles = javaVersionToCompile == TestJavacVersion.JAVAC_11
if (configurationKind.withRuntime) {
configuration.configureStandardLibs(PathUtil.kotlinPathsForDistDirectory, K2JVMCompilerArguments().also { it.noReflect = true })
@@ -239,7 +236,7 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
JAVA_BINARIES_JAR_NAME,
extraClasspath = configuration.jvmClasspathRoots.map { it.absolutePath },
assertions = JUnit5Assertions,
useJava9 = useJava9ToCompileIncludedJavaFiles
useJava11 = useJava11ToCompileIncludedJavaFiles
)
)
}
@@ -340,7 +337,7 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
extraClasspath = configuration.jvmClasspathRoots.map { it.absolutePath },
extraModulepath = modulePath,
assertions = JUnit5Assertions,
useJava9 = true
useJava11 = true
)
}
@@ -78,7 +78,7 @@ open class JvmForeignAnnotationsConfigurator(testServices: TestServices) : Envir
override fun configureCompilerConfiguration(configuration: CompilerConfiguration, module: TestModule) {
val registeredDirectives = module.directives
val javaVersionToCompile = registeredDirectives[JvmEnvironmentConfigurationDirectives.COMPILE_JAVA_USING].singleOrNull()
val useJava9ToCompileIncludedJavaFiles = javaVersionToCompile == TestJavacVersion.JAVAC_9
val useJava11ToCompileIncludedJavaFiles = javaVersionToCompile == TestJavacVersion.JAVAC_11
val annotationPath = registeredDirectives[ForeignAnnotationsDirectives.ANNOTATIONS_PATH].singleOrNull()
?: JavaForeignAnnotationType.Java8Annotations
val javaFilesDir = createTempDirectory().toFile().also {
@@ -89,9 +89,9 @@ open class JvmForeignAnnotationsConfigurator(testServices: TestServices) : Envir
"foreign-annotations",
assertions = JUnit5Assertions,
extraClasspath = configuration.jvmClasspathRoots.map { it.absolutePath },
useJava9 = useJava9ToCompileIncludedJavaFiles
useJava11 = useJava11ToCompileIncludedJavaFiles
)
configuration.addModularRootIfNotNull(useJava9ToCompileIncludedJavaFiles, "java9_annotations", foreignAnnotationsJar)
configuration.addModularRootIfNotNull(useJava11ToCompileIncludedJavaFiles, "java9_annotations", foreignAnnotationsJar)
configuration.addJvmClasspathRoot(ForTestCompileRuntime.jvmAnnotationsForTests())
if (JvmEnvironmentConfigurationDirectives.WITH_JSR305_TEST_ANNOTATIONS in registeredDirectives) {
@@ -244,10 +244,10 @@ class ModuleStructureExtractorImpl(
assertions.fail { "JVM target should be single" }
} else {
when (values.single()) {
"1.6" -> JvmPlatforms.jvm16
"1.8" -> JvmPlatforms.jvm18
"9" -> JvmPlatforms.jvm9
"15" -> JvmPlatforms.jvm15
"1.6" -> JvmPlatforms.jvm6
"1.8" -> JvmPlatforms.jvm8
"11" -> JvmPlatforms.jvm11
"17" -> JvmPlatforms.jvm17
else -> assertions.fail { "Incorrect value for JVM target" }
}
}
@@ -190,9 +190,6 @@ public class KotlinTestUtils {
assert jdk6 != null : "Environment variable JDK_16 is not set";
configuration.put(JVMConfigurationKeys.JDK_HOME, new File(jdk6));
}
else if (jdkKind == TestJdkKind.FULL_JDK_9) {
configuration.put(JVMConfigurationKeys.JDK_HOME, KtTestUtil.getJdk9Home());
}
else if (jdkKind == TestJdkKind.FULL_JDK_17) {
configuration.put(JVMConfigurationKeys.JDK_HOME, KtTestUtil.getJdk17Home());
}
@@ -415,8 +412,8 @@ public class KotlinTestUtils {
return JvmCompilationUtils.compileJavaFiles(files, options, javaErrorFile, JUnit4Assertions.INSTANCE);
}
public static boolean compileJavaFilesExternallyWithJava9(@NotNull Collection<File> files, @NotNull List<String> options) {
return JvmCompilationUtils.compileJavaFilesExternally(files, options, KtTestUtil.getJdk9Home());
public static boolean compileJavaFilesExternallyWithJava11(@NotNull Collection<File> files, @NotNull List<String> options) {
return JvmCompilationUtils.compileJavaFilesExternally(files, options, KtTestUtil.getJdk11Home());
}
public static boolean compileJavaFilesExternally(@NotNull Collection<File> files, @NotNull List<String> options, @NotNull File jdkHome) {
@@ -38,7 +38,7 @@ object MockLibraryUtilExt {
allowKotlinSources: Boolean = true,
extraOptions: List<String> = emptyList(),
extraClasspath: List<String> = emptyList(),
useJava9: Boolean = false,
useJava11: Boolean = false,
): File {
return MockLibraryUtil.compileJvmLibraryToJar(
sourcesPath,
@@ -48,7 +48,7 @@ object MockLibraryUtilExt {
extraOptions,
extraClasspath,
extraModulepath = listOf(),
useJava9,
useJava11,
JUnit4Assertions
)
}
@@ -63,7 +63,7 @@ object MockLibraryUtilExt {
allowKotlinSources: Boolean = true,
extraOptions: List<String> = emptyList(),
extraClasspath: List<String> = emptyList(),
useJava9: Boolean = false
useJava11: Boolean = false
): File {
return MockLibraryUtil.compileLibraryToJar(
sourcesPath,
@@ -74,7 +74,7 @@ object MockLibraryUtilExt {
extraOptions,
extraClasspath,
extraModulepath = listOf(),
useJava9,
useJava11,
JUnit4Assertions
)
}
@@ -55,8 +55,8 @@ fun compileJavaFiles(
}
}
fun compileJavaFilesExternallyWithJava9(files: Collection<File>, options: List<String?>): Boolean {
return compileJavaFilesExternally(files, options, KtTestUtil.getJdk9Home())
fun compileJavaFilesExternallyWithJava11(files: Collection<File>, options: List<String?>): Boolean {
return compileJavaFilesExternally(files, options, KtTestUtil.getJdk11Home())
}
fun compileJavaFilesExternally(files: Collection<File>, options: List<String?>, jdkHome: File): Boolean {
@@ -38,7 +38,7 @@ object MockLibraryUtil {
extraOptions: List<String> = emptyList(),
extraClasspath: List<String> = emptyList(),
extraModulepath: List<String> = emptyList(),
useJava9: Boolean = false,
useJava11: Boolean = false,
assertions: Assertions
): File {
return compileLibraryToJar(
@@ -50,7 +50,7 @@ object MockLibraryUtil {
extraOptions,
extraClasspath,
extraModulepath,
useJava9,
useJava11,
assertions
)
}
@@ -64,7 +64,7 @@ object MockLibraryUtil {
extraClasspath: List<String> = emptyList(),
extraModulepath: List<String> = emptyList(),
assertions: Assertions,
useJava9: Boolean = false
useJava11: Boolean = false
): File {
return compileJvmLibraryToJar(
sourcesPath, jarName, addSources,
@@ -72,7 +72,7 @@ object MockLibraryUtil {
extraOptions,
extraClasspath,
extraModulepath,
useJava9,
useJava11,
assertions
)
}
@@ -88,10 +88,10 @@ object MockLibraryUtil {
extraOptions: List<String> = emptyList(),
extraClasspath: List<String> = emptyList(),
extraModulepath: List<String> = emptyList(),
useJava9: Boolean = false,
useJava11: Boolean = false,
assertions: Assertions
): File {
assertTrue("Module path can be used only for compilation using javac 9 and higher", useJava9 || extraModulepath.isEmpty())
assertTrue("Module path can be used only for compilation using javac 9 and higher", useJava11 || extraModulepath.isEmpty())
val classesDir = File(contentDir, "classes")
@@ -121,14 +121,14 @@ object MockLibraryUtil {
add("-d")
add(classesDir.path)
if (useJava9 && extraModulepath.isNotEmpty()) {
if (useJava11 && extraModulepath.isNotEmpty()) {
add("--module-path")
add(extraModulepath.joinToString(File.pathSeparator))
}
}
val compile =
if (useJava9) ::compileJavaFilesExternallyWithJava9
if (useJava11) ::compileJavaFilesExternallyWithJava11
else { files, opts -> compileJavaFiles(files, opts, assertions = assertions) }
val success = compile(javaFiles, options)
@@ -52,19 +52,19 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
testClass<AbstractForeignAnnotationsSourceJavaTest> {
model("diagnostics/foreignAnnotationsTests/tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java8Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java9Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java11Tests", excludedPattern = excludedFirTestdataPattern)
}
testClass<AbstractForeignAnnotationsCompiledJavaTest> {
model("diagnostics/foreignAnnotationsTests/tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java8Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java9Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java11Tests", excludedPattern = excludedFirTestdataPattern)
}
testClass<AbstractForeignAnnotationsCompiledJavaWithPsiClassReadingTest> {
model("diagnostics/foreignAnnotationsTests/tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java8Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java9Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java11Tests", excludedPattern = excludedFirTestdataPattern)
}
testClass<AbstractBlackBoxCodegenTest> {
@@ -160,7 +160,7 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
) {
model("diagnostics/foreignAnnotationsTests/tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java8Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java9Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java11Tests", excludedPattern = excludedFirTestdataPattern)
}
testClass<AbstractFirForeignAnnotationsCompiledJavaTest>(
@@ -168,7 +168,7 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
) {
model("diagnostics/foreignAnnotationsTests/tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java8Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java9Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java11Tests", excludedPattern = excludedFirTestdataPattern)
}
testClass<AbstractFirForeignAnnotationsCompiledJavaWithPsiClassReadingTest>(
@@ -176,7 +176,7 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
) {
model("diagnostics/foreignAnnotationsTests/tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java8Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java9Tests", excludedPattern = excludedFirTestdataPattern)
model("diagnostics/foreignAnnotationsTests/java11Tests", excludedPattern = excludedFirTestdataPattern)
}
}
@@ -14,7 +14,7 @@ import java.io.File
import java.util.concurrent.TimeUnit
import java.util.jar.Manifest
class Java9ModulesIntegrationTest : AbstractKotlinCompilerIntegrationTest() {
class Java11ModulesIntegrationTest : AbstractKotlinCompilerIntegrationTest() {
override val testDataPath: String
get() = "compiler/testData/javaModules/"
@@ -29,7 +29,7 @@ class Java9ModulesIntegrationTest : AbstractKotlinCompilerIntegrationTest() {
val paths = (modulePath + ForTestCompileRuntime.runtimeJarForTests()).joinToString(separator = File.pathSeparator) { it.path }
val kotlinOptions = mutableListOf(
"-jdk-home", KtTestUtil.getJdk9Home().path,
"-jdk-home", KtTestUtil.getJdk11Home().path,
"-jvm-target", "1.8",
"-Xmodule-path=$paths"
)
@@ -50,7 +50,7 @@ class Java9ModulesIntegrationTest : AbstractKotlinCompilerIntegrationTest() {
javaOptions += "--add-modules"
javaOptions += addModules.joinToString()
}
KotlinTestUtils.compileJavaFilesExternallyWithJava9(javaFiles, javaOptions)
KotlinTestUtils.compileJavaFilesExternallyWithJava11(javaFiles, javaOptions)
},
checkKotlinOutput = checkKotlinOutput,
manifest = manifest
@@ -65,7 +65,7 @@ class Java9ModulesIntegrationTest : AbstractKotlinCompilerIntegrationTest() {
private fun runModule(className: String, modulePath: List<File>): ModuleRunResult {
val command = listOf(
File(KtTestUtil.getJdk9Home(), "bin/java").path,
File(KtTestUtil.getJdk11Home(), "bin/java").path,
"-p", (modulePath + ForTestCompileRuntime.runtimeJarForTests()).joinToString(File.pathSeparator, transform = File::getPath),
"-m", className
)
@@ -172,7 +172,7 @@ class Java9ModulesIntegrationTest : AbstractKotlinCompilerIntegrationTest() {
val kotlinOptions = mutableListOf(
"$testDataDirectory/someOtherDirectoryWithTheActualModuleInfo/module-info.java",
"-jdk-home", KtTestUtil.getJdk9Home().path,
"-jdk-home", KtTestUtil.getJdk11Home().path,
"-Xmodule-path=${a.path}"
)
compileLibrary(
@@ -186,15 +186,15 @@ class Java9ModulesIntegrationTest : AbstractKotlinCompilerIntegrationTest() {
fun testMultiReleaseLibrary() {
val librarySrc = FileUtil.findFilesByMask(JAVA_FILES, File(testDataDirectory, "library"))
val libraryOut = File(tmpdir, "out")
KotlinTestUtils.compileJavaFilesExternallyWithJava9(librarySrc, listOf("-d", libraryOut.path))
KotlinTestUtils.compileJavaFilesExternallyWithJava11(librarySrc, listOf("-d", libraryOut.path))
val libraryOut9 = File(tmpdir, "out9")
libraryOut9.mkdirs()
File(libraryOut, "module-info.class").renameTo(File(libraryOut9, "module-info.class"))
val libraryOut11 = File(tmpdir, "out11")
libraryOut11.mkdirs()
File(libraryOut, "module-info.class").renameTo(File(libraryOut11, "module-info.class"))
// Use the name other from 'library' to prevent it from being loaded as an automatic module if module-info.class is not found
val libraryJar = createMultiReleaseJar(
KtTestUtil.getJdk9Home(), File(tmpdir, "multi-release-library.jar"), libraryOut, libraryOut9
KtTestUtil.getJdk11Home(), File(tmpdir, "multi-release-library.jar"), libraryOut, libraryOut11
)
module("main", listOf(libraryJar))
@@ -264,7 +264,6 @@ open class AbstractClassFileToSourceStubConverterTest : AbstractKotlinKapt3Test(
addOrRemoveFlag(KaptFlag.KEEP_KDOC_COMMENTS_IN_STUBS, testFile)
super.doTest(filePath)
doTestWithJdk9(AbstractClassFileToSourceStubConverterTest::class.java, filePath)
doTestWithJdk11(AbstractClassFileToSourceStubConverterTest::class.java, filePath)
}
@@ -20,7 +20,7 @@ class IrKotlinKapt3IntegrationTests : AbstractIrKotlinKapt3IntegrationTest(), Cu
) {
super.test(name, *supportedAnnotations, options = options, process = process)
doTestWithJdk9(
doTestWithJdk11(
SingleJUnitTestRunner::class.java,
IrKotlinKapt3IntegrationTests::class.java.name + "#test" + getTestName(false)
)
@@ -34,4 +34,4 @@ class IrKotlinKapt3IntegrationTests : AbstractIrKotlinKapt3IntegrationTest(), Cu
assertEquals("myMethod", annotatedElements.single().simpleName.toString())
}
}
}
@@ -43,7 +43,7 @@ class KotlinKapt3IntegrationTests : AbstractKotlinKapt3IntegrationTest(), Custom
) {
super.test(name, *supportedAnnotations, options = options, process = process)
doTestWithJdk9(
doTestWithJdk11(
SingleJUnitTestRunner::class.java,
KotlinKapt3IntegrationTests::class.java.name + "#test" + getTestName(false)
)
@@ -228,4 +228,4 @@ internal class SingleJUnitTestRunner {
exitProcess(if (result.wasSuccessful()) 0 else 1)
}
}
}
}
@@ -26,13 +26,6 @@ import java.net.URLClassLoader
import java.util.concurrent.TimeUnit
interface CustomJdkTestLauncher {
fun doTestWithJdk9(mainClass: Class<*>, arg: String) {
// Already under Java 9
if (isJava9OrLater()) return
doTestCustomJdk(mainClass, arg, KtTestUtil.getJdk9Home())
}
fun doTestWithJdk11(mainClass: Class<*>, arg: String) {
if (isJava9OrLater()) return
KtTestUtil.getJdk11Home().let { doTestCustomJdk(mainClass, arg, it) }