From 660c438ebe722e63585efd07285d0686b86e9358 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 22 Dec 2020 16:08:14 +0300 Subject: [PATCH] [Test] Migrate tests of foreign annotations to new infrastructure This commit includes: - test runners for foreign annotation tests - minor changes testdata related to changed directives syntax - dropping tests with javac integration: old javac tests actually ran compiler without javac because of bug in configuration, so some nullability annotations features are not supported in javac mode. It's fine to drop it since javac mode is not fully supported by compiler --- .../java8Tests}/checkerFramework.kt | 2 +- .../java8Tests}/checkerFramework.txt | 0 .../java8Tests}/eclipse.kt | 2 +- .../java8Tests}/eclipse.txt | 0 .../java/AnnotatedBoundsOfWildcard.java | 0 .../java8Tests}/jspecify/java/Defaults.java | 0 .../jspecify/java/IgnoreAnnotations.java | 0 .../java/NonPlatformTypeParameter.java | 0 .../NullnessUnspecifiedTypeParameter.java | 0 .../java8Tests}/jspecify/java/SelfType.java | 0 .../java8Tests}/jspecify/java/Simple.java | 0 .../TypeArgumentsFromParameterBounds.java | 0 .../jspecify/java/TypeParameterBounds.java | 0 .../jspecify/java/WildcardsWithDefault.java | 0 .../strictMode/AnnotatedBoundsOfWildcard.kt | 0 .../strictMode/AnnotatedBoundsOfWildcard.txt | 0 .../jspecify/kotlin/strictMode/Defaults.kt | 0 .../jspecify/kotlin/strictMode/Defaults.txt | 0 .../kotlin/strictMode/IgnoreAnnotations.kt | 0 .../kotlin/strictMode/IgnoreAnnotations.txt | 0 .../strictMode/NonPlatformTypeParameter.kt | 0 .../strictMode/NonPlatformTypeParameter.txt | 0 .../NullnessUnspecifiedTypeParameter.kt | 0 .../NullnessUnspecifiedTypeParameter.txt | 0 .../jspecify/kotlin/strictMode/SelfType.kt | 0 .../jspecify/kotlin/strictMode/SelfType.txt | 0 .../jspecify/kotlin/strictMode/Simple.kt | 0 .../jspecify/kotlin/strictMode/Simple.txt | 0 .../TypeArgumentsFromParameterBounds.kt | 0 .../TypeArgumentsFromParameterBounds.txt | 0 .../kotlin/strictMode/TypeParameterBounds.kt | 0 .../kotlin/strictMode/TypeParameterBounds.txt | 0 .../kotlin/strictMode/WildcardsWithDefault.kt | 0 .../strictMode/WildcardsWithDefault.txt | 0 .../warnMode/AnnotatedBoundsOfWildcard.kt | 0 .../warnMode/AnnotatedBoundsOfWildcard.txt | 0 .../jspecify/kotlin/warnMode/Defaults.kt | 0 .../jspecify/kotlin/warnMode/Defaults.txt | 0 .../kotlin/warnMode/IgnoreAnnotations.kt | 0 .../kotlin/warnMode/IgnoreAnnotations.txt | 0 .../warnMode/NonPlatformTypeParameter.kt | 0 .../warnMode/NonPlatformTypeParameter.txt | 0 .../NullnessUnspecifiedTypeParameter.kt | 0 .../NullnessUnspecifiedTypeParameter.txt | 0 .../jspecify/kotlin/warnMode/SelfType.kt | 0 .../jspecify/kotlin/warnMode/SelfType.txt | 0 .../jspecify/kotlin/warnMode/Simple.kt | 0 .../jspecify/kotlin/warnMode/Simple.txt | 0 .../TypeArgumentsFromParameterBounds.kt | 0 .../TypeArgumentsFromParameterBounds.txt | 0 .../kotlin/warnMode/TypeParameterBounds.kt | 0 .../kotlin/warnMode/TypeParameterBounds.txt | 0 .../kotlin/warnMode/WildcardsWithDefault.kt | 0 .../kotlin/warnMode/WildcardsWithDefault.txt | 0 .../jsr305/defaultAnnotationAppliedToType.kt | 2 +- .../jsr305/defaultAnnotationAppliedToType.txt | 0 ...tAnnotationAppliedToTypeForCompiledJava.kt | 2 +- ...AnnotationAppliedToTypeForCompiledJava.txt | 0 .../jsr305/springNullableWithTypeUse.kt | 0 .../jsr305/springNullableWithTypeUse.txt | 0 .../java8Tests}/jsr305/typeArguments.kt | 10 +- .../java8Tests}/jsr305/typeArguments.txt | 0 .../jsr305/typeUseVsMethodConflict.kt | 2 +- .../jsr305/typeUseVsMethodConflict.txt | 0 .../annotatedTypeArguments.javac.txt | 0 .../typeEnhancement/annotatedTypeArguments.kt | 0 .../annotatedTypeArguments.txt | 0 .../methodWithTypeParameter.javac.txt | 0 .../methodWithTypeParameter.kt | 0 .../methodWithTypeParameter.txt | 0 .../notNullVarargsOverrides.kt | 2 +- .../notNullVarargsOverrides.txt | 0 .../nullableVarargsOverrides.kt | 2 +- .../nullableVarargsOverrides.txt | 0 .../returnTypeDifferentConstructor.javac.txt | 0 .../returnTypeDifferentConstructor.kt | 0 .../returnTypeDifferentConstructor.txt | 0 .../returnTypeOverrideInKotlin.kt | 2 +- .../returnTypeOverrideInKotlin.txt | 0 .../java8Tests}/typeEnhancement/simple.kt | 0 .../java8Tests}/typeEnhancement/simple.txt | 0 .../ClassTypeParameterBound.java | 0 .../ClassTypeParameterBound.kt | 0 .../ClassTypeParameterBoundWithWarnings.java | 0 .../ClassTypeParameterBoundWithWarnings.kt | 0 .../ReturnType.java | 0 .../ReturnType.kt | 0 .../ReturnTypeWithWarnings.java | 0 .../ReturnTypeWithWarnings.kt | 0 .../ValueParameter.java | 0 .../ValueParameter.kt | 0 .../ValueParameterWithWarnings.java | 0 .../ValueParameterWithWarnings.kt | 0 .../java8Tests}/typeUseOnObject.kt | 0 .../java8Tests}/typeUseOnObject.txt | 0 .../tests/androidRecently.kt | 2 +- .../ignore/parametersAreNonnullByDefault.kt | 2 +- .../tests/jsr305/nullabilityWarnings/elvis.kt | 2 +- .../fromPlatformTypes/arithmetic.kt | 2 +- .../fromPlatformTypes/array.kt | 2 +- .../fromPlatformTypes/assignToVar.kt | 4 +- .../fromPlatformTypes/conditions.kt | 2 +- .../fromPlatformTypes/dataFlowInfo.kt | 4 +- .../fromPlatformTypes/defaultParameters.kt | 4 +- .../fromPlatformTypes/delegatedProperties.kt | 2 +- .../fromPlatformTypes/delegation.kt | 4 +- .../fromPlatformTypes/derefenceExtension.kt | 2 +- .../fromPlatformTypes/derefenceMember.kt | 2 +- .../fromPlatformTypes/expectedType.kt | 2 +- .../fromPlatformTypes/for.kt | 2 +- .../fromPlatformTypes/functionArguments.kt | 4 +- .../fromPlatformTypes/invoke.kt | 2 +- .../fromPlatformTypes/kt6829.kt | 2 +- .../fromPlatformTypes/multiDeclaration.kt | 2 +- .../fromPlatformTypes/passToJava.kt | 4 +- .../fromPlatformTypes/primitiveArray.kt | 2 +- .../fromPlatformTypes/throw.kt | 4 +- .../uselessElvisRightIsNull.kt | 2 +- .../nullabilityWarnings/localInference.kt | 4 +- .../nullabilityGenerics.kt | 4 +- .../nullabilityNicknames.kt | 2 +- .../jsr305/nullabilityWarnings/safeCalls.kt | 2 +- .../jsr305/nullabilityWarnings/simple.kt | 2 +- .../jsr305/nullabilityWarnings/strange.kt | 2 +- .../typeQualifierDefault/equalsOnNonNull.kt | 2 +- .../typeQualifierDefault/fieldsAreNullable.kt | 2 +- .../nullabilityFromOverridden.kt | 4 +- .../overridingDefaultQualifier.kt | 2 +- .../parametersAreNonnullByDefault.kt | 2 +- .../parametersAreNonnullByDefaultPackage.kt | 2 +- .../typeQualifierDefault/springNullable.kt | 4 +- .../springNullablePackage.kt | 2 +- .../parametersAreNonnullByDefaultPackage.kt | 3 +- .../migration/customMigration.kt | 4 +- .../migration/globalIgnore.kt | 6 +- .../migration/globalWarningMigrationIgnore.kt | 6 +- .../migration/migrationError.kt | 6 +- .../migration/migrationIgnore.kt | 6 +- .../migration/migrationWarning.kt | 6 +- .../migration/overrideConflicts.kt | 4 +- .../migration/specialCollision.kt | 6 +- .../migration/stateRefinement.kt | 6 +- .../defaultAndNicknameMigrationPolicy.kt | 4 +- ...sNoAnnotationInClasspathTestGenerated.java | 659 ++++++++++++++++++ ...spathWithPsiClassReadingTestGenerated.java | 659 ++++++++++++++++++ .../ForeignAnnotationsTestGenerated.java | 659 ++++++++++++++++++ .../test/directives/DiagnosticsDirectives.kt | 7 + .../ForeignAnnotationsDirectives.kt | 40 ++ .../JvmEnvironmentConfigurationDirectives.kt | 1 + .../handlers/DeclarationsDumpHandler.kt | 8 +- .../runners/AbstractForeignAnnotationsTest.kt | 111 +++ .../JvmEnvironmentConfigurator.kt | 8 +- .../JvmForeignAnnotationsConfigurator.kt | 131 ++++ ...tationAgainstCompiledJavaTestSuppressor.kt | 19 + .../jetbrains/kotlin/test/utils/FileUtils.kt | 8 + .../AbstractJavacForeignAnnotationsTest.kt | 32 - ...bstractJavacForeignJava8AnnotationsTest.kt | 37 - ...nAnnotationsNoAnnotationInClasspathTest.kt | 53 -- .../AbstractForeignAnnotationsTest.kt | 98 --- .../AbstractForeignJava8AnnotationsTest.kt | 50 -- ...ngTest.kt => ThirdPartyAnnotationPaths.kt} | 12 +- .../jetbrains/kotlin/cli/AbstractCliTest.java | 4 +- .../jvm/compiler/LoadDescriptorUtil.java | 2 +- .../generators/GenerateJUnit3CompilerTests.kt | 17 - .../generators/GenerateJUnit5CompilerTests.kt | 15 + ...sNoAnnotationInClasspathTestGenerated.java | 498 ------------- ...spathWithPsiClassReadingTestGenerated.java | 498 ------------- .../ForeignAnnotationsTestGenerated.java | 498 ------------- .../JavacForeignAnnotationsTestGenerated.java | 498 ------------- ...nsCompiledJavaDiagnosticTestGenerated.java | 16 +- ...sNoAnnotationInClasspathTestGenerated.java | 132 ---- ...spathWithPsiClassReadingTestGenerated.java | 132 ---- .../ForeignJava8AnnotationsTestGenerated.java | 132 ---- .../JspecifyAnnotationsTestGenerated.java | 52 +- ...cForeignJava8AnnotationsTestGenerated.java | 132 ---- .../generators/tests/GenerateJava8Tests.kt | 24 +- 176 files changed, 2451 insertions(+), 2970 deletions(-) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/checkerFramework.kt (96%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/checkerFramework.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/eclipse.kt (96%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/eclipse.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/java/AnnotatedBoundsOfWildcard.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/java/Defaults.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/java/IgnoreAnnotations.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/java/NonPlatformTypeParameter.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/java/NullnessUnspecifiedTypeParameter.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/java/SelfType.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/java/Simple.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/java/TypeArgumentsFromParameterBounds.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/java/TypeParameterBounds.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/java/WildcardsWithDefault.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/Defaults.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/Defaults.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/IgnoreAnnotations.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/IgnoreAnnotations.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/NonPlatformTypeParameter.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/NonPlatformTypeParameter.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/SelfType.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/SelfType.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/Simple.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/Simple.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/TypeParameterBounds.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/TypeParameterBounds.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/WildcardsWithDefault.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/strictMode/WildcardsWithDefault.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/Defaults.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/Defaults.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/IgnoreAnnotations.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/IgnoreAnnotations.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/NonPlatformTypeParameter.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/NonPlatformTypeParameter.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/SelfType.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/SelfType.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/Simple.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/Simple.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/TypeParameterBounds.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/TypeParameterBounds.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/WildcardsWithDefault.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jspecify/kotlin/warnMode/WildcardsWithDefault.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jsr305/defaultAnnotationAppliedToType.kt (98%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jsr305/defaultAnnotationAppliedToType.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt (98%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jsr305/springNullableWithTypeUse.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jsr305/springNullableWithTypeUse.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jsr305/typeArguments.kt (83%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jsr305/typeArguments.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jsr305/typeUseVsMethodConflict.kt (98%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/jsr305/typeUseVsMethodConflict.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/annotatedTypeArguments.javac.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/annotatedTypeArguments.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/annotatedTypeArguments.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/methodWithTypeParameter.javac.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/methodWithTypeParameter.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/methodWithTypeParameter.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/notNullVarargsOverrides.kt (94%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/notNullVarargsOverrides.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/nullableVarargsOverrides.kt (94%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/nullableVarargsOverrides.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/returnTypeDifferentConstructor.javac.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/returnTypeDifferentConstructor.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/returnTypeDifferentConstructor.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/returnTypeOverrideInKotlin.kt (95%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/returnTypeOverrideInKotlin.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/simple.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancement/simple.txt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ClassTypeParameterBound.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ReturnType.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ReturnType.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ValueParameter.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ValueParameter.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.java (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeUseOnObject.kt (100%) rename compiler/testData/{foreignAnnotationsJava8/tests => foreignAnnotations/java8Tests}/typeUseOnObject.txt (100%) create mode 100644 compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java create mode 100644 compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java create mode 100644 compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsTestGenerated.java create mode 100644 compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/ForeignAnnotationsDirectives.kt create mode 100644 compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractForeignAnnotationsTest.kt create mode 100644 compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmForeignAnnotationsConfigurator.kt create mode 100644 compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/jvm/ForeignAnnotationAgainstCompiledJavaTestSuppressor.kt delete mode 100644 compiler/tests-common/tests/org/jetbrains/kotlin/cfg/javac/AbstractJavacForeignAnnotationsTest.kt delete mode 100644 compiler/tests-common/tests/org/jetbrains/kotlin/cfg/javac/AbstractJavacForeignJava8AnnotationsTest.kt delete mode 100644 compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsNoAnnotationInClasspathTest.kt delete mode 100644 compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsTest.kt delete mode 100644 compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignJava8AnnotationsTest.kt rename compiler/tests-common/tests/org/jetbrains/kotlin/checkers/{AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest.kt => ThirdPartyAnnotationPaths.kt} (57%) delete mode 100644 compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java delete mode 100644 compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java delete mode 100644 compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsTestGenerated.java delete mode 100644 compiler/tests-gen/org/jetbrains/kotlin/checkers/javac/JavacForeignAnnotationsTestGenerated.java delete mode 100644 compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated.java delete mode 100644 compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java delete mode 100644 compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsTestGenerated.java delete mode 100644 compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/javac/JavacForeignJava8AnnotationsTestGenerated.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt b/compiler/testData/foreignAnnotations/java8Tests/checkerFramework.kt similarity index 96% rename from compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt rename to compiler/testData/foreignAnnotations/java8Tests/checkerFramework.kt index 7c3d2276550..356b008d995 100644 --- a/compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt +++ b/compiler/testData/foreignAnnotations/java8Tests/checkerFramework.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// SKIP_COMPILED_JAVA +// SOURCE_RETENTION_ANNOTATIONS // FILE: A.java import org.checkerframework.checker.nullness.qual.*; diff --git a/compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.txt b/compiler/testData/foreignAnnotations/java8Tests/checkerFramework.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.txt rename to compiler/testData/foreignAnnotations/java8Tests/checkerFramework.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt b/compiler/testData/foreignAnnotations/java8Tests/eclipse.kt similarity index 96% rename from compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt rename to compiler/testData/foreignAnnotations/java8Tests/eclipse.kt index 400ea2b2db7..b0377e9c1d7 100644 --- a/compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt +++ b/compiler/testData/foreignAnnotations/java8Tests/eclipse.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// SKIP_COMPILED_JAVA +// SOURCE_RETENTION_ANNOTATIONS // FILE: A.java import org.eclipse.jdt.annotation.*; diff --git a/compiler/testData/foreignAnnotationsJava8/tests/eclipse.txt b/compiler/testData/foreignAnnotations/java8Tests/eclipse.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/eclipse.txt rename to compiler/testData/foreignAnnotations/java8Tests/eclipse.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/AnnotatedBoundsOfWildcard.java b/compiler/testData/foreignAnnotations/java8Tests/jspecify/java/AnnotatedBoundsOfWildcard.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/AnnotatedBoundsOfWildcard.java rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/java/AnnotatedBoundsOfWildcard.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/Defaults.java b/compiler/testData/foreignAnnotations/java8Tests/jspecify/java/Defaults.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/Defaults.java rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/java/Defaults.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/IgnoreAnnotations.java b/compiler/testData/foreignAnnotations/java8Tests/jspecify/java/IgnoreAnnotations.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/IgnoreAnnotations.java rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/java/IgnoreAnnotations.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/NonPlatformTypeParameter.java b/compiler/testData/foreignAnnotations/java8Tests/jspecify/java/NonPlatformTypeParameter.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/NonPlatformTypeParameter.java rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/java/NonPlatformTypeParameter.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/NullnessUnspecifiedTypeParameter.java b/compiler/testData/foreignAnnotations/java8Tests/jspecify/java/NullnessUnspecifiedTypeParameter.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/NullnessUnspecifiedTypeParameter.java rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/java/NullnessUnspecifiedTypeParameter.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/SelfType.java b/compiler/testData/foreignAnnotations/java8Tests/jspecify/java/SelfType.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/SelfType.java rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/java/SelfType.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/Simple.java b/compiler/testData/foreignAnnotations/java8Tests/jspecify/java/Simple.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/Simple.java rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/java/Simple.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/TypeArgumentsFromParameterBounds.java b/compiler/testData/foreignAnnotations/java8Tests/jspecify/java/TypeArgumentsFromParameterBounds.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/TypeArgumentsFromParameterBounds.java rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/java/TypeArgumentsFromParameterBounds.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/TypeParameterBounds.java b/compiler/testData/foreignAnnotations/java8Tests/jspecify/java/TypeParameterBounds.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/TypeParameterBounds.java rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/java/TypeParameterBounds.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/WildcardsWithDefault.java b/compiler/testData/foreignAnnotations/java8Tests/jspecify/java/WildcardsWithDefault.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/java/WildcardsWithDefault.java rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/java/WildcardsWithDefault.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/Defaults.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/Defaults.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/Defaults.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/Defaults.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/Defaults.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/Defaults.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/Defaults.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/Defaults.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/IgnoreAnnotations.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/IgnoreAnnotations.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/IgnoreAnnotations.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/IgnoreAnnotations.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/IgnoreAnnotations.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/IgnoreAnnotations.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/IgnoreAnnotations.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/IgnoreAnnotations.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/NonPlatformTypeParameter.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/NonPlatformTypeParameter.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/NonPlatformTypeParameter.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/NonPlatformTypeParameter.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/NonPlatformTypeParameter.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/NonPlatformTypeParameter.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/NonPlatformTypeParameter.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/NonPlatformTypeParameter.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/SelfType.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/SelfType.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/SelfType.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/SelfType.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/SelfType.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/SelfType.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/SelfType.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/SelfType.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/Simple.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/Simple.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/Simple.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/Simple.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/Simple.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/Simple.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/Simple.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/Simple.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/TypeParameterBounds.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/TypeParameterBounds.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/TypeParameterBounds.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/TypeParameterBounds.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/TypeParameterBounds.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/TypeParameterBounds.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/TypeParameterBounds.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/TypeParameterBounds.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/WildcardsWithDefault.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/WildcardsWithDefault.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/WildcardsWithDefault.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/WildcardsWithDefault.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/WildcardsWithDefault.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/WildcardsWithDefault.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/WildcardsWithDefault.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/WildcardsWithDefault.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/Defaults.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/Defaults.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/Defaults.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/Defaults.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/Defaults.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/Defaults.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/Defaults.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/Defaults.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/IgnoreAnnotations.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/IgnoreAnnotations.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/IgnoreAnnotations.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/IgnoreAnnotations.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/IgnoreAnnotations.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/IgnoreAnnotations.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/IgnoreAnnotations.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/IgnoreAnnotations.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/NonPlatformTypeParameter.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/NonPlatformTypeParameter.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/NonPlatformTypeParameter.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/NonPlatformTypeParameter.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/NonPlatformTypeParameter.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/NonPlatformTypeParameter.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/NonPlatformTypeParameter.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/NonPlatformTypeParameter.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/SelfType.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/SelfType.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/SelfType.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/SelfType.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/SelfType.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/SelfType.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/SelfType.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/SelfType.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/Simple.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/Simple.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/Simple.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/Simple.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/Simple.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/Simple.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/Simple.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/Simple.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/TypeParameterBounds.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/TypeParameterBounds.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/TypeParameterBounds.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/TypeParameterBounds.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/TypeParameterBounds.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/TypeParameterBounds.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/TypeParameterBounds.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/TypeParameterBounds.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/WildcardsWithDefault.kt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/WildcardsWithDefault.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/WildcardsWithDefault.kt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/WildcardsWithDefault.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/WildcardsWithDefault.txt b/compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/WildcardsWithDefault.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/WildcardsWithDefault.txt rename to compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/WildcardsWithDefault.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt b/compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToType.kt similarity index 98% rename from compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt rename to compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToType.kt index 6dab460b47e..b456190a040 100644 --- a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt +++ b/compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToType.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER // SKIP_JAVAC -// SKIP_COMPILED_JAVA +// SOURCE_RETENTION_ANNOTATIONS // FILE: spr/NonNullApi.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.txt b/compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToType.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.txt rename to compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToType.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt b/compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt similarity index 98% rename from compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt rename to compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt index f42f4703406..e507782179b 100644 --- a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt +++ b/compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER // SKIP_JAVAC -// SKIP_COMPILED_JAVA +// SOURCE_RETENTION_ANNOTATIONS // FILE: spr/NonNullApi.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.txt b/compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.txt rename to compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt b/compiler/testData/foreignAnnotations/java8Tests/jsr305/springNullableWithTypeUse.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt rename to compiler/testData/foreignAnnotations/java8Tests/jsr305/springNullableWithTypeUse.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.txt b/compiler/testData/foreignAnnotations/java8Tests/jsr305/springNullableWithTypeUse.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.txt rename to compiler/testData/foreignAnnotations/java8Tests/jsr305/springNullableWithTypeUse.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt b/compiler/testData/foreignAnnotations/java8Tests/jsr305/typeArguments.kt similarity index 83% rename from compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt rename to compiler/testData/foreignAnnotations/java8Tests/jsr305/typeArguments.kt index ee376f2237e..fc9f997911b 100644 --- a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt +++ b/compiler/testData/foreignAnnotations/java8Tests/jsr305/typeArguments.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER // !WITH_NEW_INFERENCE // RENDER_PACKAGE: test -// SKIP_COMPILED_JAVA +// SOURCE_RETENTION_ANNOTATIONS // WITH_RUNTIME // FILE: spr/Nullable.java @@ -89,9 +89,9 @@ fun main(a: test.A, l: L, Int?>, l1: L, Int>) a.bar(l1 as L, Int?>) a.baz1().t().containsKey("") - a.baz1().t().containsKey(null) + a.baz1().t().containsKey(null) a.baz1().t().containsValue(1) - a.baz1().t().containsValue(null) + a.baz1().t().containsValue(null) a.baz1().s().hashCode() a.baz1().setT(l.t()) @@ -105,8 +105,8 @@ fun main(a: test.A, l: L, Int?>, l1: L, Int>) a.baz2().s().hashCode() a.baz3().t().containsKey("") - a.baz3().t().containsKey(null) + a.baz3().t().containsKey(null) a.baz3().t().containsValue(1) - a.baz3().t().containsValue(null) + a.baz3().t().containsValue(null) a.baz3().s().hashCode() } diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.txt b/compiler/testData/foreignAnnotations/java8Tests/jsr305/typeArguments.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.txt rename to compiler/testData/foreignAnnotations/java8Tests/jsr305/typeArguments.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt b/compiler/testData/foreignAnnotations/java8Tests/jsr305/typeUseVsMethodConflict.kt similarity index 98% rename from compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt rename to compiler/testData/foreignAnnotations/java8Tests/jsr305/typeUseVsMethodConflict.kt index d9931c5c933..a5e561a8b84 100644 --- a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt +++ b/compiler/testData/foreignAnnotations/java8Tests/jsr305/typeUseVsMethodConflict.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER // SKIP_JAVAC -// SKIP_COMPILED_JAVA +// SOURCE_RETENTION_ANNOTATIONS // FILE: spr/NonNullApi.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.txt b/compiler/testData/foreignAnnotations/java8Tests/jsr305/typeUseVsMethodConflict.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.txt rename to compiler/testData/foreignAnnotations/java8Tests/jsr305/typeUseVsMethodConflict.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.javac.txt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/annotatedTypeArguments.javac.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.javac.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/annotatedTypeArguments.javac.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/annotatedTypeArguments.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/annotatedTypeArguments.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.txt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/annotatedTypeArguments.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/annotatedTypeArguments.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.javac.txt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/methodWithTypeParameter.javac.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.javac.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/methodWithTypeParameter.javac.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/methodWithTypeParameter.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/methodWithTypeParameter.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.txt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/methodWithTypeParameter.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/methodWithTypeParameter.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/notNullVarargsOverrides.kt similarity index 94% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/notNullVarargsOverrides.kt index 064490eabc6..54447f6dc80 100644 --- a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt +++ b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/notNullVarargsOverrides.kt @@ -1,4 +1,4 @@ -// SKIP_COMPILED_JAVA +// SOURCE_RETENTION_ANNOTATIONS // FILE: BaseClass.java import org.checkerframework.checker.nullness.qual.*; diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.txt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/notNullVarargsOverrides.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/notNullVarargsOverrides.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/nullableVarargsOverrides.kt similarity index 94% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/nullableVarargsOverrides.kt index 2485a94b269..6d9493a06ad 100644 --- a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt +++ b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/nullableVarargsOverrides.kt @@ -1,4 +1,4 @@ -// SKIP_COMPILED_JAVA +// SOURCE_RETENTION_ANNOTATIONS // FILE: BaseClass.java import org.checkerframework.checker.nullness.qual.*; diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.txt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/nullableVarargsOverrides.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/nullableVarargsOverrides.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.javac.txt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeDifferentConstructor.javac.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.javac.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeDifferentConstructor.javac.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeDifferentConstructor.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeDifferentConstructor.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.txt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeDifferentConstructor.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeDifferentConstructor.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeOverrideInKotlin.kt similarity index 95% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeOverrideInKotlin.kt index f9b0196f55b..1779f2ff832 100644 --- a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt +++ b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeOverrideInKotlin.kt @@ -1,4 +1,4 @@ -// SKIP_COMPILED_JAVA +// SOURCE_RETENTION_ANNOTATIONS // FILE: Base.java public interface Base {} // FILE: A.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.txt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeOverrideInKotlin.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeOverrideInKotlin.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/simple.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/simple.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.txt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/simple.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/simple.txt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.java b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.java rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.java b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.java rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnType.java b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnType.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnType.java rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnType.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnType.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnType.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnType.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnType.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.java b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.java rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameter.java b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameter.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameter.java rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameter.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameter.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameter.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameter.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameter.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.java b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.java similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.java rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.java diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt b/compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt b/compiler/testData/foreignAnnotations/java8Tests/typeUseOnObject.kt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt rename to compiler/testData/foreignAnnotations/java8Tests/typeUseOnObject.kt diff --git a/compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.txt b/compiler/testData/foreignAnnotations/java8Tests/typeUseOnObject.txt similarity index 100% rename from compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.txt rename to compiler/testData/foreignAnnotations/java8Tests/typeUseOnObject.txt diff --git a/compiler/testData/foreignAnnotations/tests/androidRecently.kt b/compiler/testData/foreignAnnotations/tests/androidRecently.kt index d1e0d25799b..87db9d10e37 100644 --- a/compiler/testData/foreignAnnotations/tests/androidRecently.kt +++ b/compiler/testData/foreignAnnotations/tests/androidRecently.kt @@ -28,7 +28,7 @@ public class A { fun main(a: A, a1: A) { a.foo("", null)?.length a.foo("", null).length - a.foo(null, "").length + a.foo(null, "").length a.bar().length a.bar()!!.length diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt b/compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt index 88e688729da..699d56e42b0 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT ignore +// JSR305_GLOBAL_REPORT: ignore // FILE: A.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt index 577e1f7f007..0d8430398c6 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: MyNotNull.java import javax.annotation.Nonnull; diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt index afcf67e81f6..553a9ed4f19 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt @@ -1,4 +1,4 @@ -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt index 7fa13399fa1..250f5d751d0 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt @@ -1,4 +1,4 @@ -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt index ac2604e3d0a..7f242acc517 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt @@ -1,4 +1,4 @@ -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java @@ -23,4 +23,4 @@ fun test() { n = J.staticNN n = J.staticN n = J.staticJ -} \ No newline at end of file +} diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt index ca1893a3de0..1fa019d5b35 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt index e605d9401e2..ee206e827cf 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java @@ -28,4 +28,4 @@ fun test() { } } -fun foo(j: J) {} \ No newline at end of file +fun foo(j: J) {} diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt index ae0230cd4fe..9e7593d52a1 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java @@ -21,4 +21,4 @@ fun test() { fun foo(p: J = platformNN, p1: J = platformN, p2: J = platformJ) {} fun foo1(p: J? = platformNN, p1: J? = platformN, p2: J? = platformJ) {} -} \ No newline at end of file +} diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt index a1a1271e667..a2dff017faf 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt @@ -1,4 +1,4 @@ -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt index b68e3d8ce6b..01103a43cc4 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt @@ -1,4 +1,4 @@ -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FULL_JDK // FILE: J.java @@ -16,4 +16,4 @@ public class J { class A : List by J.staticNN class B : List by J.staticN -class C : List by J.staticJ \ No newline at end of file +class C : List by J.staticJ diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt index 2b2597e624c..bfb6cfd93db 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt index c2a7b613c5e..207a8578d78 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt index fe78c4c18d6..deb8609a588 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt @@ -1,5 +1,5 @@ // !CHECK_TYPE -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt index aa9903cad3a..5d5cf0bc3d0 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt @@ -1,4 +1,4 @@ -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt index 3b88e1a4faa..766ddce2c58 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java @@ -24,4 +24,4 @@ fun test() { } fun foo(j: J) {} -fun bar(j: J?) {} \ No newline at end of file +fun bar(j: J?) {} diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt index f139bb0c8ac..56f66ef3048 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt @@ -1,4 +1,4 @@ -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt index 1ddfc4b8ed5..6c4cd9997c8 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // KT-6829 False warning on map to @Nullable diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt index da222f94377..db8b11f6fc6 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt index 1be98d46514..0942cef64a1 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt @@ -1,4 +1,4 @@ -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java @@ -87,4 +87,4 @@ fun test(n: J?, nn: J) { J(n, n, n) J(platformN, platformN, platformN) J(platformJ, platformJ, platformJ) -} \ No newline at end of file +} diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt index 41df7a664ac..4d7e339f976 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt @@ -1,4 +1,4 @@ -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt index 063d5a8040a..d1f329b07ec 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt @@ -1,4 +1,4 @@ -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java @@ -22,4 +22,4 @@ fun test1() { fun test2() { throw J.staticJ -} \ No newline at end of file +} diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt index a45fb76b54d..ed18465e1d4 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: J.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt index 91a649fc727..ba8daa5eb6d 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_EXPRESSION -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: MyNotNull.java import javax.annotation.Nonnull; @@ -93,4 +93,4 @@ fun ifChecksAndSmartCasts() { // Platform val r5 = if (e == null) 42 else e.length val r6 = if (f == null) 42 else f.length -} \ No newline at end of file +} diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt index 1833cedee0b..eec05644e1f 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: A.java public class A { @@ -38,4 +38,4 @@ fun test() { a.foo(null) val b: String = a.bar() -} \ No newline at end of file +} diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt index e3925d20cb4..e0a88b0452c 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: MyNullable.java import javax.annotation.*; diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt index 401bd236b74..39c0347a208 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: MyNotNull.java import javax.annotation.Nonnull; diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt index 08ad56c2509..59063f744a1 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: A.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt index 4d523713f40..5a2b75f10d6 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: A.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt index 7a293e23b98..7f16516d921 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: spr/NonNullApi.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt index 430fca93cf7..fd4307af307 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: FieldsAreNullable.java import java.lang.annotation.Documented; diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt index 68e1be1e1bd..bcc0288c1ed 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: NonNullApi.java @@ -156,4 +156,4 @@ fun main(a: A, b: B, c: C) { c.bar1(null)?.length c.bar2(null).length c.baz(null).length -} \ No newline at end of file +} diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt index dfa676a71d5..5d96db14821 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: NonNullApi.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt index e84522ab81f..88c9350f771 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: A.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt index 82bdb9efe2f..60a195b55e0 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: test/package-info.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt index 47af51393bd..4d5c7f9d1f5 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: spr/Nullable.java @@ -69,7 +69,7 @@ public class A { fun main(a: A) { a.foo("", null)?.length a.foo("", null).length - a.foo(null, "").length + a.foo(null, "").length a.bar().length a.bar()!!.length diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt index a6d55046292..c258023f619 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: spr/Nullable.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt b/compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt index 84bb68a0baf..dca155d9b83 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt @@ -1,6 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// RENDER_PACKAGE: test -// RENDER_PACKAGE: test2 +// RENDER_PACKAGE: test, test2 // FILE: test/package-info.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt index 901f060308d..872c955e69c 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT ignore +// JSR305_GLOBAL_REPORT: ignore // FILE: MyErrorNonnull.java import javax.annotation.*; @@ -81,4 +81,4 @@ fun main(a: A) { a.foo4("") a.foo4(null) -} \ No newline at end of file +} diff --git a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt index 72245c8be03..32f86ddb6df 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT ignore -// JSR305_MIGRATION_REPORT strict -// JSR305_SPECIAL_REPORT MyNonnull:warn +// JSR305_GLOBAL_REPORT: ignore +// JSR305_MIGRATION_REPORT: strict +// JSR305_SPECIAL_REPORT: MyNonnull:warn // FILE: A.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt index 571c247ac0a..dd19df3595c 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn -// JSR305_MIGRATION_REPORT ignore -// JSR305_SPECIAL_REPORT MyNullable:strict, MyMigrationNonnull:strict +// JSR305_GLOBAL_REPORT: warn +// JSR305_MIGRATION_REPORT: ignore +// JSR305_SPECIAL_REPORT: MyNullable:strict, MyMigrationNonnull:strict // FILE: A.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt index d881422d507..d4ec6cc35ef 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn -// JSR305_MIGRATION_REPORT strict -// JSR305_SPECIAL_REPORT MyNonnull:ignore, MySuperNull:strict +// JSR305_GLOBAL_REPORT: warn +// JSR305_MIGRATION_REPORT: strict +// JSR305_SPECIAL_REPORT: MyNonnull:ignore, MySuperNull:strict // FILE: MySuperNull.java import javax.annotation.*; diff --git a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt index d0557e9655e..e545e32d7b2 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT strict -// JSR305_MIGRATION_REPORT ignore -// JSR305_SPECIAL_REPORT MyNullable:warn, MyMigrationNonnull:strict +// JSR305_GLOBAL_REPORT: strict +// JSR305_MIGRATION_REPORT: ignore +// JSR305_SPECIAL_REPORT: MyNullable:warn, MyMigrationNonnull:strict // FILE: A.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt index 8c636fbbd5a..3ff18b11f3e 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT strict -// JSR305_MIGRATION_REPORT warn -// JSR305_SPECIAL_REPORT MyNullable:ignore, MyMigrationNullable:strict +// JSR305_GLOBAL_REPORT: strict +// JSR305_MIGRATION_REPORT: warn +// JSR305_SPECIAL_REPORT: MyNullable:ignore, MyMigrationNullable:strict // FILE: A.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt index 649a59425dc..e1f6c124fdb 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn -// JSR305_MIGRATION_REPORT strict +// JSR305_GLOBAL_REPORT: warn +// JSR305_MIGRATION_REPORT: strict // FILE: A.java import javax.annotation.Nullable; diff --git a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt index adb449454cb..f81586e0dfd 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT ignore -// JSR305_MIGRATION_REPORT ignore -// JSR305_SPECIAL_REPORT MyNonnull:warn, MyMigrationNonnull:strict +// JSR305_GLOBAL_REPORT: ignore +// JSR305_MIGRATION_REPORT: ignore +// JSR305_SPECIAL_REPORT: MyNonnull:warn, MyMigrationNonnull:strict // FILE: A.java diff --git a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt index f5669b101d9..8e9879de5a3 100644 --- a/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt +++ b/compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt @@ -1,7 +1,7 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT ignore -// JSR305_MIGRATION_REPORT warn -// JSR305_SPECIAL_REPORT MyNonnull:strict +// JSR305_GLOBAL_REPORT: ignore +// JSR305_MIGRATION_REPORT: warn +// JSR305_SPECIAL_REPORT: MyNonnull:strict // FILE: A.java diff --git a/compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt b/compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt index 15e8c92e4a9..3f5d6a0fc90 100644 --- a/compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt +++ b/compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt @@ -1,5 +1,5 @@ // !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -// JSR305_GLOBAL_REPORT warn +// JSR305_GLOBAL_REPORT: warn // FILE: NonNullApi.java @@ -66,4 +66,4 @@ fun main(default: PolicyFromDefault, nickname: PolicyFromNickname) { nickname.foo(null).length nickname.foo("hello").length -} \ No newline at end of file +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java new file mode 100644 index 00000000000..241f58fcbbc --- /dev/null +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java @@ -0,0 +1,659 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.runners; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.util.KtTestUtil; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests") + @TestDataPath("$PROJECT_ROOT") + public class Tests extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInTests() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("androidRecently.kt") + public void testAndroidRecently() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/androidRecently.kt"); + } + + @Test + @TestMetadata("androidSdk.kt") + public void testAndroidSdk() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/androidSdk.kt"); + } + + @Test + @TestMetadata("android_support.kt") + public void testAndroid_support() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); + } + + @Test + @TestMetadata("androidx.kt") + public void testAndroidx() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); + } + + @Test + @TestMetadata("aosp.kt") + public void testAosp() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); + } + + @Test + @TestMetadata("checkerFramework.kt") + public void testCheckerFramework() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); + } + + @Test + @TestMetadata("eclipse.kt") + public void testEclipse() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); + } + + @Test + @TestMetadata("findBugsSimple.kt") + public void testFindBugsSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); + } + + @Test + @TestMetadata("irrelevantQualifierNicknames.kt") + public void testIrrelevantQualifierNicknames() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); + } + + @Test + @TestMetadata("lombokSimple.kt") + public void testLombokSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); + } + + @Test + @TestMetadata("rxjava.kt") + public void testRxjava() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/rxjava.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") + @TestDataPath("$PROJECT_ROOT") + public class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInJsr305() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("nonNullNever.kt") + public void testNonNullNever() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); + } + + @Test + @TestMetadata("nullabilityNicknames.kt") + public void testNullabilityNicknames() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); + } + + @Test + @TestMetadata("strange.kt") + public void testStrange() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore") + @TestDataPath("$PROJECT_ROOT") + public class Ignore extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInIgnore() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("parametersAreNonnullByDefault.kt") + public void testParametersAreNonnullByDefault() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings") + @TestDataPath("$PROJECT_ROOT") + public class NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInNullabilityWarnings() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("elvis.kt") + public void testElvis() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); + } + + @Test + @TestMetadata("localInference.kt") + public void testLocalInference() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); + } + + @Test + @TestMetadata("nullabilityGenerics.kt") + public void testNullabilityGenerics() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); + } + + @Test + @TestMetadata("nullabilityNicknames.kt") + public void testNullabilityNicknames() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); + } + + @Test + @TestMetadata("safeCalls.kt") + public void testSafeCalls() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); + } + + @Test + @TestMetadata("strange.kt") + public void testStrange() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes") + @TestDataPath("$PROJECT_ROOT") + public class FromPlatformTypes extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInFromPlatformTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("arithmetic.kt") + public void testArithmetic() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); + } + + @Test + @TestMetadata("array.kt") + public void testArray() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); + } + + @Test + @TestMetadata("assignToVar.kt") + public void testAssignToVar() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); + } + + @Test + @TestMetadata("conditions.kt") + public void testConditions() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); + } + + @Test + @TestMetadata("dataFlowInfo.kt") + public void testDataFlowInfo() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); + } + + @Test + @TestMetadata("defaultParameters.kt") + public void testDefaultParameters() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); + } + + @Test + @TestMetadata("delegatedProperties.kt") + public void testDelegatedProperties() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); + } + + @Test + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); + } + + @Test + @TestMetadata("derefenceExtension.kt") + public void testDerefenceExtension() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); + } + + @Test + @TestMetadata("derefenceMember.kt") + public void testDerefenceMember() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); + } + + @Test + @TestMetadata("expectedType.kt") + public void testExpectedType() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); + } + + @Test + @TestMetadata("for.kt") + public void testFor() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); + } + + @Test + @TestMetadata("functionArguments.kt") + public void testFunctionArguments() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); + } + + @Test + @TestMetadata("invoke.kt") + public void testInvoke() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); + } + + @Test + @TestMetadata("kt6829.kt") + public void testKt6829() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); + } + + @Test + @TestMetadata("multiDeclaration.kt") + public void testMultiDeclaration() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); + } + + @Test + @TestMetadata("passToJava.kt") + public void testPassToJava() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); + } + + @Test + @TestMetadata("primitiveArray.kt") + public void testPrimitiveArray() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); + } + + @Test + @TestMetadata("throw.kt") + public void testThrow() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); + } + + @Test + @TestMetadata("uselessElvisRightIsNull.kt") + public void testUselessElvisRightIsNull() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault") + @TestDataPath("$PROJECT_ROOT") + public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("equalsOnNonNull.kt") + public void testEqualsOnNonNull() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); + } + + @Test + @TestMetadata("fieldsAreNullable.kt") + public void testFieldsAreNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); + } + + @Test + @TestMetadata("nullabilityFromOverridden.kt") + public void testNullabilityFromOverridden() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); + } + + @Test + @TestMetadata("overridingDefaultQualifier.kt") + public void testOverridingDefaultQualifier() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefault.kt") + public void testParametersAreNonnullByDefault() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefaultPackage.kt") + public void testParametersAreNonnullByDefaultPackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); + } + + @Test + @TestMetadata("springNullable.kt") + public void testSpringNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); + } + + @Test + @TestMetadata("springNullablePackage.kt") + public void testSpringNullablePackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault") + @TestDataPath("$PROJECT_ROOT") + public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("fieldsAreNullable.kt") + public void testFieldsAreNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); + } + + @Test + @TestMetadata("forceFlexibility.kt") + public void testForceFlexibility() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); + } + + @Test + @TestMetadata("forceFlexibleOverOverrides.kt") + public void testForceFlexibleOverOverrides() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); + } + + @Test + @TestMetadata("nullabilityFromOverridden.kt") + public void testNullabilityFromOverridden() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); + } + + @Test + @TestMetadata("overridingDefaultQualifier.kt") + public void testOverridingDefaultQualifier() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefault.kt") + public void testParametersAreNonnullByDefault() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefaultPackage.kt") + public void testParametersAreNonnullByDefaultPackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); + } + + @Test + @TestMetadata("springNullable.kt") + public void testSpringNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); + } + + @Test + @TestMetadata("springNullablePackage.kt") + public void testSpringNullablePackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings") + @TestDataPath("$PROJECT_ROOT") + public class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration") + @TestDataPath("$PROJECT_ROOT") + public class Migration extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInMigration() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("customMigration.kt") + public void testCustomMigration() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); + } + + @Test + @TestMetadata("globalIgnore.kt") + public void testGlobalIgnore() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); + } + + @Test + @TestMetadata("globalWarningMigrationIgnore.kt") + public void testGlobalWarningMigrationIgnore() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); + } + + @Test + @TestMetadata("migrationError.kt") + public void testMigrationError() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); + } + + @Test + @TestMetadata("migrationIgnore.kt") + public void testMigrationIgnore() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); + } + + @Test + @TestMetadata("migrationWarning.kt") + public void testMigrationWarning() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); + } + + @Test + @TestMetadata("overrideConflicts.kt") + public void testOverrideConflicts() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); + } + + @Test + @TestMetadata("specialCollision.kt") + public void testSpecialCollision() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); + } + + @Test + @TestMetadata("stateRefinement.kt") + public void testStateRefinement() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault") + @TestDataPath("$PROJECT_ROOT") + public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("defaultAndNicknameMigrationPolicy.kt") + public void testDefaultAndNicknameMigrationPolicy() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests") + @TestDataPath("$PROJECT_ROOT") + public class Java8Tests extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInJava8Tests() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify", "typeEnhancementOnCompiledJava"); + } + + @Test + @TestMetadata("checkerFramework.kt") + public void testCheckerFramework() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/checkerFramework.kt"); + } + + @Test + @TestMetadata("eclipse.kt") + public void testEclipse() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/eclipse.kt"); + } + + @Test + @TestMetadata("typeUseOnObject.kt") + public void testTypeUseOnObject() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeUseOnObject.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/jsr305") + @TestDataPath("$PROJECT_ROOT") + public class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInJsr305() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("defaultAnnotationAppliedToType.kt") + public void testDefaultAnnotationAppliedToType() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToType.kt"); + } + + @Test + @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") + public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); + } + + @Test + @TestMetadata("springNullableWithTypeUse.kt") + public void testSpringNullableWithTypeUse() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/springNullableWithTypeUse.kt"); + } + + @Test + @TestMetadata("typeArguments.kt") + public void testTypeArguments() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/typeArguments.kt"); + } + + @Test + @TestMetadata("typeUseVsMethodConflict.kt") + public void testTypeUseVsMethodConflict() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/typeUseVsMethodConflict.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement") + @TestDataPath("$PROJECT_ROOT") + public class TypeEnhancement extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + @Test + public void testAllFilesPresentInTypeEnhancement() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("annotatedTypeArguments.kt") + public void testAnnotatedTypeArguments() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/annotatedTypeArguments.kt"); + } + + @Test + @TestMetadata("methodWithTypeParameter.kt") + public void testMethodWithTypeParameter() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/methodWithTypeParameter.kt"); + } + + @Test + @TestMetadata("notNullVarargsOverrides.kt") + public void testNotNullVarargsOverrides() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/notNullVarargsOverrides.kt"); + } + + @Test + @TestMetadata("nullableVarargsOverrides.kt") + public void testNullableVarargsOverrides() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/nullableVarargsOverrides.kt"); + } + + @Test + @TestMetadata("returnTypeDifferentConstructor.kt") + public void testReturnTypeDifferentConstructor() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeDifferentConstructor.kt"); + } + + @Test + @TestMetadata("returnTypeOverrideInKotlin.kt") + public void testReturnTypeOverrideInKotlin() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/simple.kt"); + } + } + } +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java new file mode 100644 index 00000000000..67f869a6cf8 --- /dev/null +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java @@ -0,0 +1,659 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.runners; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.util.KtTestUtil; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests") + @TestDataPath("$PROJECT_ROOT") + public class Tests extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInTests() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("androidRecently.kt") + public void testAndroidRecently() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/androidRecently.kt"); + } + + @Test + @TestMetadata("androidSdk.kt") + public void testAndroidSdk() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/androidSdk.kt"); + } + + @Test + @TestMetadata("android_support.kt") + public void testAndroid_support() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); + } + + @Test + @TestMetadata("androidx.kt") + public void testAndroidx() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); + } + + @Test + @TestMetadata("aosp.kt") + public void testAosp() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); + } + + @Test + @TestMetadata("checkerFramework.kt") + public void testCheckerFramework() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); + } + + @Test + @TestMetadata("eclipse.kt") + public void testEclipse() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); + } + + @Test + @TestMetadata("findBugsSimple.kt") + public void testFindBugsSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); + } + + @Test + @TestMetadata("irrelevantQualifierNicknames.kt") + public void testIrrelevantQualifierNicknames() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); + } + + @Test + @TestMetadata("lombokSimple.kt") + public void testLombokSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); + } + + @Test + @TestMetadata("rxjava.kt") + public void testRxjava() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/rxjava.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") + @TestDataPath("$PROJECT_ROOT") + public class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInJsr305() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("nonNullNever.kt") + public void testNonNullNever() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); + } + + @Test + @TestMetadata("nullabilityNicknames.kt") + public void testNullabilityNicknames() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); + } + + @Test + @TestMetadata("strange.kt") + public void testStrange() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore") + @TestDataPath("$PROJECT_ROOT") + public class Ignore extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInIgnore() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("parametersAreNonnullByDefault.kt") + public void testParametersAreNonnullByDefault() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings") + @TestDataPath("$PROJECT_ROOT") + public class NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInNullabilityWarnings() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("elvis.kt") + public void testElvis() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); + } + + @Test + @TestMetadata("localInference.kt") + public void testLocalInference() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); + } + + @Test + @TestMetadata("nullabilityGenerics.kt") + public void testNullabilityGenerics() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); + } + + @Test + @TestMetadata("nullabilityNicknames.kt") + public void testNullabilityNicknames() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); + } + + @Test + @TestMetadata("safeCalls.kt") + public void testSafeCalls() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); + } + + @Test + @TestMetadata("strange.kt") + public void testStrange() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes") + @TestDataPath("$PROJECT_ROOT") + public class FromPlatformTypes extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInFromPlatformTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("arithmetic.kt") + public void testArithmetic() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); + } + + @Test + @TestMetadata("array.kt") + public void testArray() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); + } + + @Test + @TestMetadata("assignToVar.kt") + public void testAssignToVar() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); + } + + @Test + @TestMetadata("conditions.kt") + public void testConditions() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); + } + + @Test + @TestMetadata("dataFlowInfo.kt") + public void testDataFlowInfo() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); + } + + @Test + @TestMetadata("defaultParameters.kt") + public void testDefaultParameters() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); + } + + @Test + @TestMetadata("delegatedProperties.kt") + public void testDelegatedProperties() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); + } + + @Test + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); + } + + @Test + @TestMetadata("derefenceExtension.kt") + public void testDerefenceExtension() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); + } + + @Test + @TestMetadata("derefenceMember.kt") + public void testDerefenceMember() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); + } + + @Test + @TestMetadata("expectedType.kt") + public void testExpectedType() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); + } + + @Test + @TestMetadata("for.kt") + public void testFor() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); + } + + @Test + @TestMetadata("functionArguments.kt") + public void testFunctionArguments() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); + } + + @Test + @TestMetadata("invoke.kt") + public void testInvoke() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); + } + + @Test + @TestMetadata("kt6829.kt") + public void testKt6829() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); + } + + @Test + @TestMetadata("multiDeclaration.kt") + public void testMultiDeclaration() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); + } + + @Test + @TestMetadata("passToJava.kt") + public void testPassToJava() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); + } + + @Test + @TestMetadata("primitiveArray.kt") + public void testPrimitiveArray() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); + } + + @Test + @TestMetadata("throw.kt") + public void testThrow() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); + } + + @Test + @TestMetadata("uselessElvisRightIsNull.kt") + public void testUselessElvisRightIsNull() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault") + @TestDataPath("$PROJECT_ROOT") + public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("equalsOnNonNull.kt") + public void testEqualsOnNonNull() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); + } + + @Test + @TestMetadata("fieldsAreNullable.kt") + public void testFieldsAreNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); + } + + @Test + @TestMetadata("nullabilityFromOverridden.kt") + public void testNullabilityFromOverridden() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); + } + + @Test + @TestMetadata("overridingDefaultQualifier.kt") + public void testOverridingDefaultQualifier() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefault.kt") + public void testParametersAreNonnullByDefault() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefaultPackage.kt") + public void testParametersAreNonnullByDefaultPackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); + } + + @Test + @TestMetadata("springNullable.kt") + public void testSpringNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); + } + + @Test + @TestMetadata("springNullablePackage.kt") + public void testSpringNullablePackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault") + @TestDataPath("$PROJECT_ROOT") + public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("fieldsAreNullable.kt") + public void testFieldsAreNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); + } + + @Test + @TestMetadata("forceFlexibility.kt") + public void testForceFlexibility() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); + } + + @Test + @TestMetadata("forceFlexibleOverOverrides.kt") + public void testForceFlexibleOverOverrides() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); + } + + @Test + @TestMetadata("nullabilityFromOverridden.kt") + public void testNullabilityFromOverridden() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); + } + + @Test + @TestMetadata("overridingDefaultQualifier.kt") + public void testOverridingDefaultQualifier() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefault.kt") + public void testParametersAreNonnullByDefault() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefaultPackage.kt") + public void testParametersAreNonnullByDefaultPackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); + } + + @Test + @TestMetadata("springNullable.kt") + public void testSpringNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); + } + + @Test + @TestMetadata("springNullablePackage.kt") + public void testSpringNullablePackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings") + @TestDataPath("$PROJECT_ROOT") + public class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration") + @TestDataPath("$PROJECT_ROOT") + public class Migration extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInMigration() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("customMigration.kt") + public void testCustomMigration() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); + } + + @Test + @TestMetadata("globalIgnore.kt") + public void testGlobalIgnore() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); + } + + @Test + @TestMetadata("globalWarningMigrationIgnore.kt") + public void testGlobalWarningMigrationIgnore() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); + } + + @Test + @TestMetadata("migrationError.kt") + public void testMigrationError() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); + } + + @Test + @TestMetadata("migrationIgnore.kt") + public void testMigrationIgnore() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); + } + + @Test + @TestMetadata("migrationWarning.kt") + public void testMigrationWarning() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); + } + + @Test + @TestMetadata("overrideConflicts.kt") + public void testOverrideConflicts() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); + } + + @Test + @TestMetadata("specialCollision.kt") + public void testSpecialCollision() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); + } + + @Test + @TestMetadata("stateRefinement.kt") + public void testStateRefinement() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault") + @TestDataPath("$PROJECT_ROOT") + public class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("defaultAndNicknameMigrationPolicy.kt") + public void testDefaultAndNicknameMigrationPolicy() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests") + @TestDataPath("$PROJECT_ROOT") + public class Java8Tests extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInJava8Tests() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify", "typeEnhancementOnCompiledJava"); + } + + @Test + @TestMetadata("checkerFramework.kt") + public void testCheckerFramework() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/checkerFramework.kt"); + } + + @Test + @TestMetadata("eclipse.kt") + public void testEclipse() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/eclipse.kt"); + } + + @Test + @TestMetadata("typeUseOnObject.kt") + public void testTypeUseOnObject() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeUseOnObject.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/jsr305") + @TestDataPath("$PROJECT_ROOT") + public class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInJsr305() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("defaultAnnotationAppliedToType.kt") + public void testDefaultAnnotationAppliedToType() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToType.kt"); + } + + @Test + @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") + public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); + } + + @Test + @TestMetadata("springNullableWithTypeUse.kt") + public void testSpringNullableWithTypeUse() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/springNullableWithTypeUse.kt"); + } + + @Test + @TestMetadata("typeArguments.kt") + public void testTypeArguments() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/typeArguments.kt"); + } + + @Test + @TestMetadata("typeUseVsMethodConflict.kt") + public void testTypeUseVsMethodConflict() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/typeUseVsMethodConflict.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement") + @TestDataPath("$PROJECT_ROOT") + public class TypeEnhancement extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { + @Test + public void testAllFilesPresentInTypeEnhancement() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("annotatedTypeArguments.kt") + public void testAnnotatedTypeArguments() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/annotatedTypeArguments.kt"); + } + + @Test + @TestMetadata("methodWithTypeParameter.kt") + public void testMethodWithTypeParameter() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/methodWithTypeParameter.kt"); + } + + @Test + @TestMetadata("notNullVarargsOverrides.kt") + public void testNotNullVarargsOverrides() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/notNullVarargsOverrides.kt"); + } + + @Test + @TestMetadata("nullableVarargsOverrides.kt") + public void testNullableVarargsOverrides() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/nullableVarargsOverrides.kt"); + } + + @Test + @TestMetadata("returnTypeDifferentConstructor.kt") + public void testReturnTypeDifferentConstructor() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeDifferentConstructor.kt"); + } + + @Test + @TestMetadata("returnTypeOverrideInKotlin.kt") + public void testReturnTypeOverrideInKotlin() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/simple.kt"); + } + } + } +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsTestGenerated.java new file mode 100644 index 00000000000..548f5bd78ec --- /dev/null +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ForeignAnnotationsTestGenerated.java @@ -0,0 +1,659 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.runners; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.util.KtTestUtil; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsTest { + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests") + @TestDataPath("$PROJECT_ROOT") + public class Tests extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInTests() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("androidRecently.kt") + public void testAndroidRecently() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/androidRecently.kt"); + } + + @Test + @TestMetadata("androidSdk.kt") + public void testAndroidSdk() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/androidSdk.kt"); + } + + @Test + @TestMetadata("android_support.kt") + public void testAndroid_support() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); + } + + @Test + @TestMetadata("androidx.kt") + public void testAndroidx() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); + } + + @Test + @TestMetadata("aosp.kt") + public void testAosp() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); + } + + @Test + @TestMetadata("checkerFramework.kt") + public void testCheckerFramework() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); + } + + @Test + @TestMetadata("eclipse.kt") + public void testEclipse() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); + } + + @Test + @TestMetadata("findBugsSimple.kt") + public void testFindBugsSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); + } + + @Test + @TestMetadata("irrelevantQualifierNicknames.kt") + public void testIrrelevantQualifierNicknames() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); + } + + @Test + @TestMetadata("lombokSimple.kt") + public void testLombokSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); + } + + @Test + @TestMetadata("rxjava.kt") + public void testRxjava() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/rxjava.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") + @TestDataPath("$PROJECT_ROOT") + public class Jsr305 extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInJsr305() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("nonNullNever.kt") + public void testNonNullNever() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); + } + + @Test + @TestMetadata("nullabilityNicknames.kt") + public void testNullabilityNicknames() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); + } + + @Test + @TestMetadata("strange.kt") + public void testStrange() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore") + @TestDataPath("$PROJECT_ROOT") + public class Ignore extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInIgnore() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("parametersAreNonnullByDefault.kt") + public void testParametersAreNonnullByDefault() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings") + @TestDataPath("$PROJECT_ROOT") + public class NullabilityWarnings extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInNullabilityWarnings() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("elvis.kt") + public void testElvis() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); + } + + @Test + @TestMetadata("localInference.kt") + public void testLocalInference() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); + } + + @Test + @TestMetadata("nullabilityGenerics.kt") + public void testNullabilityGenerics() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); + } + + @Test + @TestMetadata("nullabilityNicknames.kt") + public void testNullabilityNicknames() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); + } + + @Test + @TestMetadata("safeCalls.kt") + public void testSafeCalls() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); + } + + @Test + @TestMetadata("strange.kt") + public void testStrange() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes") + @TestDataPath("$PROJECT_ROOT") + public class FromPlatformTypes extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInFromPlatformTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("arithmetic.kt") + public void testArithmetic() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); + } + + @Test + @TestMetadata("array.kt") + public void testArray() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); + } + + @Test + @TestMetadata("assignToVar.kt") + public void testAssignToVar() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); + } + + @Test + @TestMetadata("conditions.kt") + public void testConditions() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); + } + + @Test + @TestMetadata("dataFlowInfo.kt") + public void testDataFlowInfo() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); + } + + @Test + @TestMetadata("defaultParameters.kt") + public void testDefaultParameters() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); + } + + @Test + @TestMetadata("delegatedProperties.kt") + public void testDelegatedProperties() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); + } + + @Test + @TestMetadata("delegation.kt") + public void testDelegation() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); + } + + @Test + @TestMetadata("derefenceExtension.kt") + public void testDerefenceExtension() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); + } + + @Test + @TestMetadata("derefenceMember.kt") + public void testDerefenceMember() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); + } + + @Test + @TestMetadata("expectedType.kt") + public void testExpectedType() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); + } + + @Test + @TestMetadata("for.kt") + public void testFor() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); + } + + @Test + @TestMetadata("functionArguments.kt") + public void testFunctionArguments() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); + } + + @Test + @TestMetadata("invoke.kt") + public void testInvoke() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); + } + + @Test + @TestMetadata("kt6829.kt") + public void testKt6829() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); + } + + @Test + @TestMetadata("multiDeclaration.kt") + public void testMultiDeclaration() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); + } + + @Test + @TestMetadata("passToJava.kt") + public void testPassToJava() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); + } + + @Test + @TestMetadata("primitiveArray.kt") + public void testPrimitiveArray() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); + } + + @Test + @TestMetadata("throw.kt") + public void testThrow() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); + } + + @Test + @TestMetadata("uselessElvisRightIsNull.kt") + public void testUselessElvisRightIsNull() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault") + @TestDataPath("$PROJECT_ROOT") + public class TypeQualifierDefault extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("equalsOnNonNull.kt") + public void testEqualsOnNonNull() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); + } + + @Test + @TestMetadata("fieldsAreNullable.kt") + public void testFieldsAreNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); + } + + @Test + @TestMetadata("nullabilityFromOverridden.kt") + public void testNullabilityFromOverridden() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); + } + + @Test + @TestMetadata("overridingDefaultQualifier.kt") + public void testOverridingDefaultQualifier() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefault.kt") + public void testParametersAreNonnullByDefault() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefaultPackage.kt") + public void testParametersAreNonnullByDefaultPackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); + } + + @Test + @TestMetadata("springNullable.kt") + public void testSpringNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); + } + + @Test + @TestMetadata("springNullablePackage.kt") + public void testSpringNullablePackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault") + @TestDataPath("$PROJECT_ROOT") + public class TypeQualifierDefault extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("fieldsAreNullable.kt") + public void testFieldsAreNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); + } + + @Test + @TestMetadata("forceFlexibility.kt") + public void testForceFlexibility() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); + } + + @Test + @TestMetadata("forceFlexibleOverOverrides.kt") + public void testForceFlexibleOverOverrides() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); + } + + @Test + @TestMetadata("nullabilityFromOverridden.kt") + public void testNullabilityFromOverridden() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); + } + + @Test + @TestMetadata("overridingDefaultQualifier.kt") + public void testOverridingDefaultQualifier() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefault.kt") + public void testParametersAreNonnullByDefault() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); + } + + @Test + @TestMetadata("parametersAreNonnullByDefaultPackage.kt") + public void testParametersAreNonnullByDefaultPackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); + } + + @Test + @TestMetadata("springNullable.kt") + public void testSpringNullable() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); + } + + @Test + @TestMetadata("springNullablePackage.kt") + public void testSpringNullablePackage() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings") + @TestDataPath("$PROJECT_ROOT") + public class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration") + @TestDataPath("$PROJECT_ROOT") + public class Migration extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInMigration() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("customMigration.kt") + public void testCustomMigration() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); + } + + @Test + @TestMetadata("globalIgnore.kt") + public void testGlobalIgnore() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); + } + + @Test + @TestMetadata("globalWarningMigrationIgnore.kt") + public void testGlobalWarningMigrationIgnore() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); + } + + @Test + @TestMetadata("migrationError.kt") + public void testMigrationError() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); + } + + @Test + @TestMetadata("migrationIgnore.kt") + public void testMigrationIgnore() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); + } + + @Test + @TestMetadata("migrationWarning.kt") + public void testMigrationWarning() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); + } + + @Test + @TestMetadata("overrideConflicts.kt") + public void testOverrideConflicts() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); + } + + @Test + @TestMetadata("specialCollision.kt") + public void testSpecialCollision() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); + } + + @Test + @TestMetadata("stateRefinement.kt") + public void testStateRefinement() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault") + @TestDataPath("$PROJECT_ROOT") + public class TypeQualifierDefault extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("defaultAndNicknameMigrationPolicy.kt") + public void testDefaultAndNicknameMigrationPolicy() throws Exception { + runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); + } + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests") + @TestDataPath("$PROJECT_ROOT") + public class Java8Tests extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInJava8Tests() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify", "typeEnhancementOnCompiledJava"); + } + + @Test + @TestMetadata("checkerFramework.kt") + public void testCheckerFramework() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/checkerFramework.kt"); + } + + @Test + @TestMetadata("eclipse.kt") + public void testEclipse() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/eclipse.kt"); + } + + @Test + @TestMetadata("typeUseOnObject.kt") + public void testTypeUseOnObject() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeUseOnObject.kt"); + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/jsr305") + @TestDataPath("$PROJECT_ROOT") + public class Jsr305 extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInJsr305() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("defaultAnnotationAppliedToType.kt") + public void testDefaultAnnotationAppliedToType() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToType.kt"); + } + + @Test + @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") + public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); + } + + @Test + @TestMetadata("springNullableWithTypeUse.kt") + public void testSpringNullableWithTypeUse() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/springNullableWithTypeUse.kt"); + } + + @Test + @TestMetadata("typeArguments.kt") + public void testTypeArguments() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/typeArguments.kt"); + } + + @Test + @TestMetadata("typeUseVsMethodConflict.kt") + public void testTypeUseVsMethodConflict() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/jsr305/typeUseVsMethodConflict.kt"); + } + } + + @Nested + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement") + @TestDataPath("$PROJECT_ROOT") + public class TypeEnhancement extends AbstractForeignAnnotationsTest { + @Test + public void testAllFilesPresentInTypeEnhancement() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("annotatedTypeArguments.kt") + public void testAnnotatedTypeArguments() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/annotatedTypeArguments.kt"); + } + + @Test + @TestMetadata("methodWithTypeParameter.kt") + public void testMethodWithTypeParameter() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/methodWithTypeParameter.kt"); + } + + @Test + @TestMetadata("notNullVarargsOverrides.kt") + public void testNotNullVarargsOverrides() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/notNullVarargsOverrides.kt"); + } + + @Test + @TestMetadata("nullableVarargsOverrides.kt") + public void testNullableVarargsOverrides() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/nullableVarargsOverrides.kt"); + } + + @Test + @TestMetadata("returnTypeDifferentConstructor.kt") + public void testReturnTypeDifferentConstructor() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeDifferentConstructor.kt"); + } + + @Test + @TestMetadata("returnTypeOverrideInKotlin.kt") + public void testReturnTypeOverrideInKotlin() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancement/simple.kt"); + } + } + } +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/DiagnosticsDirectives.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/DiagnosticsDirectives.kt index 52f043cdd35..487acb809f7 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/DiagnosticsDirectives.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/DiagnosticsDirectives.kt @@ -55,4 +55,11 @@ object DiagnosticsDirectives : SimpleDirectivesContainer() { is enabled in test """.trimIndent() ) + + val RENDER_PACKAGE by stringDirective( + description = """ + Dump declaration from packages listed in directive + (additional to root package) + """.trimIndent() + ) } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/ForeignAnnotationsDirectives.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/ForeignAnnotationsDirectives.kt new file mode 100644 index 00000000000..7f1839c8e3e --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/ForeignAnnotationsDirectives.kt @@ -0,0 +1,40 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.directives + +import org.jetbrains.kotlin.test.directives.model.SimpleDirectivesContainer +import org.jetbrains.kotlin.test.services.configuration.JdkForeignAnnotationType +import org.jetbrains.kotlin.utils.ReportLevel + +@Suppress("RemoveExplicitTypeArguments") +object ForeignAnnotationsDirectives : SimpleDirectivesContainer() { + val JSR305_GLOBAL_REPORT by enumDirective( + description = "Global report level", + additionalParser = ReportLevel.Companion::findByDescription + ) + + val JSR305_MIGRATION_REPORT by enumDirective( + description = "Migration report level", + additionalParser = ReportLevel.Companion::findByDescription + ) + + val JSR305_SPECIAL_REPORT by stringDirective( + description = "Report level for specific annotations" + ) + + val JSPECIFY_STATE by enumDirective( + description = "Report level for jSpecify annotations", + additionalParser = ReportLevel.Companion::findByDescription + ) + + val ANNOTATIONS_PATH by enumDirective( + description = "Path to foreign annotations" + ) + + val SOURCE_RETENTION_ANNOTATIONS by directive( + description = "Skip test against compiled annotation because of their Source retention" + ) +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/JvmEnvironmentConfigurationDirectives.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/JvmEnvironmentConfigurationDirectives.kt index a32f9dbb48a..c0b623f48dc 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/JvmEnvironmentConfigurationDirectives.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/directives/JvmEnvironmentConfigurationDirectives.kt @@ -33,4 +33,5 @@ object JvmEnvironmentConfigurationDirectives : SimpleDirectivesContainer() { val USE_PSI_CLASS_FILES_READING by directive("Use a slower (PSI-based) class files reading implementation") val USE_JAVAC by directive("Enable javac integration") + val SKIP_JAVA_SOURCES by directive("Don't add java sources to compile classpath") } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/handlers/DeclarationsDumpHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/handlers/DeclarationsDumpHandler.kt index 5593fe9c115..2a9811ff291 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/handlers/DeclarationsDumpHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/classic/handlers/DeclarationsDumpHandler.kt @@ -66,6 +66,7 @@ class DeclarationsDumpHandler( assertions.assertEqualsToFile(expectedFile, resultDump) } + @OptIn(ExperimentalStdlibApi::class) override fun processModule(module: TestModule, info: ClassicFrontendOutputArtifact) { if (DiagnosticsDirectives.SKIP_TXT in module.directives) return val moduleDescriptor = info.analysisResult.moduleDescriptor @@ -73,7 +74,12 @@ class DeclarationsDumpHandler( val comparator = RecursiveDescriptorComparator( createdAffectedPackagesConfiguration(module.files, info.ktFiles, moduleDescriptor, checkTypeEnabled) ) - val packages = listOf(FqName.ROOT) + val packages = buildList { + module.directives[DiagnosticsDirectives.RENDER_PACKAGE].forEach { + add(FqName(it)) + } + add(FqName.ROOT) + } val textByPackage = packages.keysToMap { StringBuilder() } for ((packageName, packageText) in textByPackage.entries) { diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractForeignAnnotationsTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractForeignAnnotationsTest.kt new file mode 100644 index 00000000000..666b071dae1 --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/AbstractForeignAnnotationsTest.kt @@ -0,0 +1,111 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.runners + +import org.jetbrains.kotlin.platform.jvm.JvmPlatforms +import org.jetbrains.kotlin.test.builders.Constructor +import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder +import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.REPORT_JVM_DIAGNOSTICS_ON_FRONTEND +import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.SKIP_TXT +import org.jetbrains.kotlin.test.directives.ForeignAnnotationsDirectives.ANNOTATIONS_PATH +import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.SKIP_JAVA_SOURCES +import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.USE_JAVAC +import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.USE_PSI_CLASS_FILES_READING +import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendFacade +import org.jetbrains.kotlin.test.frontend.classic.handlers.ClassicDiagnosticsHandler +import org.jetbrains.kotlin.test.frontend.classic.handlers.DeclarationsDumpHandler +import org.jetbrains.kotlin.test.frontend.classic.handlers.OldNewInferenceMetaInfoProcessor +import org.jetbrains.kotlin.test.model.BackendKind +import org.jetbrains.kotlin.test.model.DependencyKind +import org.jetbrains.kotlin.test.model.FrontendKinds +import org.jetbrains.kotlin.test.services.AdditionalDiagnosticsSourceFilesProvider +import org.jetbrains.kotlin.test.services.CoroutineHelpersSourceFilesProvider +import org.jetbrains.kotlin.test.services.configuration.JdkForeignAnnotationType +import org.jetbrains.kotlin.test.services.configuration.JvmEnvironmentConfigurator +import org.jetbrains.kotlin.test.services.configuration.JvmForeignAnnotationsAgainstCompiledJavaConfigurator +import org.jetbrains.kotlin.test.services.configuration.JvmForeignAnnotationsConfigurator +import org.jetbrains.kotlin.test.services.jvm.ForeignAnnotationAgainstCompiledJavaTestSuppressor + +abstract class AbstractForeignAnnotationsTestBase : AbstractKotlinCompilerTest() { + protected abstract val foreignAnnotationsConfigurator: Constructor + + override fun TestConfigurationBuilder.configuration() { + globalDefaults { + frontend = FrontendKinds.ClassicFrontend + backend = BackendKind.NoBackend + targetPlatform = JvmPlatforms.defaultJvmPlatform + dependencyKind = DependencyKind.Source + } + + defaultDirectives { + +REPORT_JVM_DIAGNOSTICS_ON_FRONTEND + } + + enableMetaInfoHandler() + + useConfigurators( + ::JvmEnvironmentConfigurator, + foreignAnnotationsConfigurator + ) + + useMetaInfoProcessors(::OldNewInferenceMetaInfoProcessor) + useAdditionalSourceProviders( + ::AdditionalDiagnosticsSourceFilesProvider, + ::CoroutineHelpersSourceFilesProvider, + ) + + useFrontendFacades(::ClassicFrontendFacade) + useFrontendHandlers( + ::DeclarationsDumpHandler, + ::ClassicDiagnosticsHandler, + ) + + forTestsMatching("compiler/testData/foreignAnnotations/tests/*") { + defaultDirectives { + ANNOTATIONS_PATH with JdkForeignAnnotationType.Annotations + } + } + + forTestsMatching("compiler/testData/foreignAnnotations/java8Tests/*") { + defaultDirectives { + ANNOTATIONS_PATH with JdkForeignAnnotationType.Jdk8Annotations + } + } + } +} + +abstract class AbstractForeignAnnotationsTest : AbstractForeignAnnotationsTestBase() { + override val foreignAnnotationsConfigurator: Constructor + get() = ::JvmForeignAnnotationsConfigurator +} + +abstract class AbstractForeignAnnotationsNoAnnotationInClasspathTest : AbstractForeignAnnotationsTestBase() { + override val foreignAnnotationsConfigurator: Constructor + get() = ::JvmForeignAnnotationsAgainstCompiledJavaConfigurator + + override fun configure(builder: TestConfigurationBuilder) { + super.configure(builder) + with(builder) { + defaultDirectives { + +SKIP_JAVA_SOURCES + +SKIP_TXT + } + + useMetaTestConfigurators(::ForeignAnnotationAgainstCompiledJavaTestSuppressor) + } + } +} + +abstract class AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest : AbstractForeignAnnotationsNoAnnotationInClasspathTest() { + override fun configure(builder: TestConfigurationBuilder) { + super.configure(builder) + with(builder) { + defaultDirectives { + +USE_PSI_CLASS_FILES_READING + } + } + } +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt index e40acf9035b..cd2b1738609 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt @@ -107,9 +107,11 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig val isIr = module.backendKind == BackendKinds.IrBackend configuration.put(JVMConfigurationKeys.IR, isIr) - module.javaFiles.takeIf { it.isNotEmpty() }?.let { javaFiles -> - javaFiles.forEach { testServices.sourceFileProvider.getRealFileForSourceFile(it) } - configuration.addJavaSourceRoot(testServices.sourceFileProvider.javaSourceDirectory) + if (JvmEnvironmentConfigurationDirectives.SKIP_JAVA_SOURCES !in module.directives) { + module.javaFiles.takeIf { it.isNotEmpty() }?.let { javaFiles -> + javaFiles.forEach { testServices.sourceFileProvider.getRealFileForSourceFile(it) } + configuration.addJavaSourceRoot(testServices.sourceFileProvider.javaSourceDirectory) + } } configuration.registerModuleDependencies(module) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmForeignAnnotationsConfigurator.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmForeignAnnotationsConfigurator.kt new file mode 100644 index 00000000000..3054825246e --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmForeignAnnotationsConfigurator.kt @@ -0,0 +1,131 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.services.configuration + +import com.intellij.mock.MockProject +import org.jetbrains.kotlin.cli.jvm.config.JvmContentRoot +import org.jetbrains.kotlin.cli.jvm.config.addJvmClasspathRoots +import org.jetbrains.kotlin.codegen.CodegenTestUtil +import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime +import org.jetbrains.kotlin.config.AnalysisFlag +import org.jetbrains.kotlin.config.CompilerConfiguration +import org.jetbrains.kotlin.config.JvmAnalysisFlags +import org.jetbrains.kotlin.test.MockLibraryUtil +import org.jetbrains.kotlin.test.directives.ForeignAnnotationsDirectives +import org.jetbrains.kotlin.test.directives.ForeignAnnotationsDirectives.JSPECIFY_STATE +import org.jetbrains.kotlin.test.directives.ForeignAnnotationsDirectives.JSR305_GLOBAL_REPORT +import org.jetbrains.kotlin.test.directives.ForeignAnnotationsDirectives.JSR305_MIGRATION_REPORT +import org.jetbrains.kotlin.test.directives.ForeignAnnotationsDirectives.JSR305_SPECIAL_REPORT +import org.jetbrains.kotlin.test.directives.model.DirectivesContainer +import org.jetbrains.kotlin.test.directives.model.RegisteredDirectives +import org.jetbrains.kotlin.test.directives.model.singleOrZeroValue +import org.jetbrains.kotlin.test.model.TestModule +import org.jetbrains.kotlin.test.services.* +import org.jetbrains.kotlin.test.util.KtTestUtil +import org.jetbrains.kotlin.utils.JavaTypeEnhancementState +import org.jetbrains.kotlin.utils.ReportLevel +import java.io.File + +enum class JdkForeignAnnotationType(val path: String) { + Annotations("third-party/annotations"), + Jdk8Annotations("third-party/jdk8-annotations"); + + companion object { + val FOREIGN_ANNOTATIONS_SOURCES_PATH = Annotations.path + val FOREIGN_JDK8_ANNOTATIONS_SOURCES_PATH = Jdk8Annotations.path + } +} + +open class JvmForeignAnnotationsConfigurator(testServices: TestServices) : EnvironmentConfigurator(testServices) { + companion object { + private const val TEST_ANNOTATIONS_SOURCE_PATH = "compiler/testData/foreignAnnotations/testAnnotations" + } + + override val directivesContainers: List + get() = listOf(ForeignAnnotationsDirectives) + + @OptIn(ExperimentalStdlibApi::class) + override fun configureCompilerConfiguration(configuration: CompilerConfiguration, module: TestModule, project: MockProject) { + val extraClassPath = buildList { + val foreignAnnotations = createJarWithForeignAnnotations(module) + addAll(foreignAnnotations) + addAll(compileTestAnnotations(foreignAnnotations)) + } + configuration.addJvmClasspathRoots(extraClassPath) + } + + protected fun createJarWithForeignAnnotations(module: TestModule): List { + val directive = ForeignAnnotationsDirectives.ANNOTATIONS_PATH + val annotationsPath = module.directives.singleOrZeroValue(directive) + ?.path + ?: error("${directive.name} should be specified in test or test runner") + + return listOf( + MockLibraryUtil.compileJavaFilesLibraryToJar(annotationsPath, "foreign-annotations", assertions = JUnit5Assertions), + ForTestCompileRuntime.jvmAnnotationsForTests() + ) + } + + protected fun compileTestAnnotations(extraClassPath: List): List = + listOf( + MockLibraryUtil.compileJavaFilesLibraryToJar( + TEST_ANNOTATIONS_SOURCE_PATH, + "test-foreign-annotations", + extraOptions = listOf("-Xallow-kotlin-package"), + extraClasspath = extraClassPath.map { it.path }, + assertions = JUnit5Assertions + ) + ) + + override fun provideAdditionalAnalysisFlags(directives: RegisteredDirectives): Map, Any?> { + val globalState = directives.singleOrZeroValue(JSR305_GLOBAL_REPORT) ?: ReportLevel.STRICT + val migrationState = directives.singleOrZeroValue(JSR305_MIGRATION_REPORT) + val userAnnotationsState = directives[JSR305_SPECIAL_REPORT].mapNotNull { + val (name, stateDescription) = it.split(":").takeIf { it.size == 2 } ?: return@mapNotNull null + val state = ReportLevel.findByDescription(stateDescription) ?: return@mapNotNull null + name to state + }.toMap() + val jSpecifyReportLevel = directives.singleOrZeroValue(JSPECIFY_STATE) ?: ReportLevel.STRICT + return mapOf( + JvmAnalysisFlags.javaTypeEnhancementState to JavaTypeEnhancementState( + globalState, + migrationState, + userAnnotationsState, + jspecifyReportLevel = jSpecifyReportLevel + ) + ) + } +} + +class JvmForeignAnnotationsAgainstCompiledJavaConfigurator(testServices: TestServices) : JvmForeignAnnotationsConfigurator(testServices) { + @OptIn(ExperimentalStdlibApi::class) + override fun configureCompilerConfiguration(configuration: CompilerConfiguration, module: TestModule, project: MockProject) { + val compiledJavaPath = KtTestUtil.tmpDir("java-compiled-files") + + val foreignAnnotations = createJarWithForeignAnnotations(module) + val testAnnotations = compileTestAnnotations(foreignAnnotations) + val additionalClasspath = buildList { + addAll(foreignAnnotations) + addAll(testAnnotations) + }.map { it.path } + + module.javaFiles.forEach { testServices.sourceFileProvider.getRealFileForSourceFile(it) } + CodegenTestUtil.compileJava( + CodegenTestUtil.findJavaSourcesInDirectory(testServices.sourceFileProvider.javaSourceDirectory), + additionalClasspath, + emptyList(), + compiledJavaPath, + JUnit5Assertions + ) + + val extraClassPath = buildList { + add(compiledJavaPath) + addAll(testAnnotations) + } + + configuration.addJvmClasspathRoots(extraClassPath) + } +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/jvm/ForeignAnnotationAgainstCompiledJavaTestSuppressor.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/jvm/ForeignAnnotationAgainstCompiledJavaTestSuppressor.kt new file mode 100644 index 00000000000..c7403aca269 --- /dev/null +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/jvm/ForeignAnnotationAgainstCompiledJavaTestSuppressor.kt @@ -0,0 +1,19 @@ +/* + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.test.services.jvm + +import org.jetbrains.kotlin.test.directives.ForeignAnnotationsDirectives.SOURCE_RETENTION_ANNOTATIONS +import org.jetbrains.kotlin.test.services.MetaTestConfigurator +import org.jetbrains.kotlin.test.services.TestServices +import org.jetbrains.kotlin.test.services.moduleStructure +import org.jetbrains.kotlin.test.utils.isDirectiveDefined + +class ForeignAnnotationAgainstCompiledJavaTestSuppressor(testServices: TestServices) : MetaTestConfigurator(testServices) { + override fun shouldSkipTest(): Boolean { + val testFile = testServices.moduleStructure.originalTestDataFiles.first() + return testFile.isDirectiveDefined("// ${SOURCE_RETENTION_ANNOTATIONS.name}") + } +} diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FileUtils.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FileUtils.kt index 3a881490d4e..f6f91eecff9 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FileUtils.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/utils/FileUtils.kt @@ -32,3 +32,11 @@ fun File.withExtension(extension: String): File { val extension = extension.removePrefix(".") return parentFile.resolve("$nameWithoutExtension.$extension") } + +/* + * Please use this method only in places where `TestModule` is not accessible + * In other cases use testModule.directives + */ +fun File.isDirectiveDefined(directive: String): Boolean = this.useLines { line -> + line.any { it == directive } +} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/cfg/javac/AbstractJavacForeignAnnotationsTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/cfg/javac/AbstractJavacForeignAnnotationsTest.kt deleted file mode 100644 index bb7700f0bbd..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/cfg/javac/AbstractJavacForeignAnnotationsTest.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2010-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.checkers.javac - -import org.jetbrains.kotlin.checkers.AbstractForeignAnnotationsTest -import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment -import org.jetbrains.kotlin.config.JVMConfigurationKeys -import java.io.File - -abstract class AbstractJavacForeignAnnotationsTest : AbstractForeignAnnotationsTest() { - - override fun setupEnvironment(environment: KotlinCoreEnvironment, testDataFile: File, files: List) { - val groupedByModule = files.groupBy(TestFile::module) - val allKtFiles = groupedByModule.values.flatMap { getKtFiles(it, true) } - environment.registerJavac(kotlinFiles = allKtFiles) - environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true) - } -} \ No newline at end of file diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/cfg/javac/AbstractJavacForeignJava8AnnotationsTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/cfg/javac/AbstractJavacForeignJava8AnnotationsTest.kt deleted file mode 100644 index c282336e6d1..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/cfg/javac/AbstractJavacForeignJava8AnnotationsTest.kt +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2010-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.checkers.javac - -import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsTest -import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment -import org.jetbrains.kotlin.config.JVMConfigurationKeys -import java.io.File - -abstract class AbstractJavacForeignJava8AnnotationsTest : AbstractForeignJava8AnnotationsTest() { - - override fun shouldSkipTest(wholeFile: File, files: List): Boolean { - return isSkipJavacTest(wholeFile) - } - - override fun setupEnvironment(environment: KotlinCoreEnvironment, testDataFile: File, files: List) { - val groupedByModule = files.groupBy(TestFile::module) - val allKtFiles = groupedByModule.values.flatMap { getKtFiles(it, true) } - environment.registerJavac(kotlinFiles = allKtFiles) - environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true) - } - -} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsNoAnnotationInClasspathTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsNoAnnotationInClasspathTest.kt deleted file mode 100644 index 8990007a67c..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsNoAnnotationInClasspathTest.kt +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2010-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.checkers - -import org.jetbrains.kotlin.codegen.CodegenTestUtil -import org.jetbrains.kotlin.test.InTextDirectivesUtils -import org.jetbrains.kotlin.test.util.JUnit4Assertions -import org.jetbrains.kotlin.test.util.KtTestUtil -import java.io.File - -abstract class AbstractForeignAnnotationsNoAnnotationInClasspathTest : AbstractForeignAnnotationsTest() { - // This should be executed after setUp runs, since setUp changes the root folder - // for temporary files. - private val compiledJavaPath by lazy { - KtTestUtil.tmpDir("java-compiled-files") - } - - override fun getExtraClasspath(): List { - val foreignAnnotations = createJarWithForeignAnnotations() - val testAnnotations = compileTestAnnotations(foreignAnnotations) - - val additionalClasspath = (foreignAnnotations + testAnnotations).map { it.path } - CodegenTestUtil.compileJava( - CodegenTestUtil.findJavaSourcesInDirectory(javaFilesDir), - additionalClasspath, emptyList(), - compiledJavaPath, - JUnit4Assertions - ) - - return listOf(compiledJavaPath) + testAnnotations - } - - override fun shouldSkipTest(wholeFile: File, files: List): Boolean { - return files.any { file -> InTextDirectivesUtils.isDirectiveDefined(file.expectedText, "// SOURCE_RETENTION_ANNOTATIONS") } - } - - override fun isJavaSourceRootNeeded() = false - override fun skipDescriptorsValidation() = true -} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsTest.kt deleted file mode 100644 index 9cdb58b1cfe..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsTest.kt +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2010-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.checkers - -import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime -import org.jetbrains.kotlin.config.* -import org.jetbrains.kotlin.test.InTextDirectivesUtils -import org.jetbrains.kotlin.test.MockLibraryUtilExt -import org.jetbrains.kotlin.utils.JavaTypeEnhancementState -import org.jetbrains.kotlin.utils.ReportLevel -import java.io.File - -const val FOREIGN_ANNOTATIONS_SOURCES_PATH = "third-party/annotations" -const val FOREIGN_JDK8_ANNOTATIONS_SOURCES_PATH = "third-party/jdk8-annotations" -const val TEST_ANNOTATIONS_SOURCE_PATH = "compiler/testData/foreignAnnotations/testAnnotations" - -abstract class AbstractForeignAnnotationsTest : AbstractDiagnosticsTest() { - override fun getExtraClasspath(): List { - val foreignAnnotations = createJarWithForeignAnnotations() - return foreignAnnotations + compileTestAnnotations(foreignAnnotations) - } - - protected fun compileTestAnnotations(extraClassPath: List): List = - listOf(MockLibraryUtilExt.compileJavaFilesLibraryToJar( - TEST_ANNOTATIONS_SOURCE_PATH, - "test-foreign-annotations", - extraOptions = listOf("-Xallow-kotlin-package"), - extraClasspath = extraClassPath.map { it.path } - )) - - protected fun createJarWithForeignAnnotations(): List = listOf( - MockLibraryUtilExt.compileJavaFilesLibraryToJar(annotationsPath, "foreign-annotations"), - ForTestCompileRuntime.jvmAnnotationsForTests() - ) - - protected open val annotationsPath: String - get() = FOREIGN_ANNOTATIONS_SOURCES_PATH - - override fun loadLanguageVersionSettings(module: List): LanguageVersionSettings { - val analysisFlags = loadAnalysisFlags(module) - return CompilerTestLanguageVersionSettings( - DEFAULT_DIAGNOSTIC_TESTS_FEATURES, - ApiVersion.LATEST_STABLE, - LanguageVersion.LATEST_STABLE, - analysisFlags = analysisFlags - ) - } - - private fun loadAnalysisFlags(module: List): Map, Any?> { - val globalState = module.getDirectiveValue(JSR305_GLOBAL_DIRECTIVE) ?: ReportLevel.STRICT - val migrationState = module.getDirectiveValue(JSR305_MIGRATION_DIRECTIVE) - - val userAnnotationsState = module.flatMap { - InTextDirectivesUtils.findListWithPrefixes(it.expectedText, JSR305_SPECIAL_DIRECTIVE) - }.mapNotNull { - val (name, stateDescription) = it.split(":").takeIf { it.size == 2 } ?: return@mapNotNull null - val state = ReportLevel.findByDescription(stateDescription) ?: return@mapNotNull null - - name to state - }.toMap() - - val jspecifyReportLevel = module.getDirectiveValue(JSPECIFY_STATE_SPECIAL_DIRECTIVE) ?: ReportLevel.STRICT - - return mapOf( - JvmAnalysisFlags.javaTypeEnhancementState to JavaTypeEnhancementState( - globalState, - migrationState, - userAnnotationsState, - jspecifyReportLevel = jspecifyReportLevel - ) - ) - } - - private fun List.getDirectiveValue(directive: String): ReportLevel? = mapNotNull { - InTextDirectivesUtils.findLinesWithPrefixesRemoved(it.expectedText, directive).firstOrNull() - }.firstOrNull().let { ReportLevel.findByDescription(it) } - - companion object { - private const val JSR305_GLOBAL_DIRECTIVE = "JSR305_GLOBAL_REPORT" - private const val JSR305_MIGRATION_DIRECTIVE = "JSR305_MIGRATION_REPORT" - private const val JSR305_SPECIAL_DIRECTIVE = "JSR305_SPECIAL_REPORT" - private const val JSPECIFY_STATE_SPECIAL_DIRECTIVE = "JSPECIFY_STATE" - } -} diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignJava8AnnotationsTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignJava8AnnotationsTest.kt deleted file mode 100644 index b359b287ced..00000000000 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignJava8AnnotationsTest.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.checkers - -import org.jetbrains.kotlin.test.InTextDirectivesUtils -import java.io.File - -abstract class AbstractForeignJava8AnnotationsTest : AbstractForeignAnnotationsTest() { - override val annotationsPath: String - get() = JAVA8_ANNOTATION_SOURCES_PATH -} - -abstract class AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest : AbstractForeignAnnotationsNoAnnotationInClasspathTest() { - override val annotationsPath: String - get() = JAVA8_ANNOTATION_SOURCES_PATH - - override fun shouldSkipTest(wholeFile: File, files: List): Boolean { - return skipForCompiledVersion(files) - } -} - -abstract class AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest : - AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest() { - override val annotationsPath: String - get() = JAVA8_ANNOTATION_SOURCES_PATH - - override fun shouldSkipTest(wholeFile: File, files: List): Boolean { - return skipForCompiledVersion(files) - } -} - -private fun skipForCompiledVersion(files: List) = - files.any { file -> InTextDirectivesUtils.isDirectiveDefined(file.expectedText, "// SKIP_COMPILED_JAVA") } - - -private const val JAVA8_ANNOTATION_SOURCES_PATH = "third-party/jdk8-annotations" diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/ThirdPartyAnnotationPaths.kt similarity index 57% rename from compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest.kt rename to compiler/tests-common/tests/org/jetbrains/kotlin/checkers/ThirdPartyAnnotationPaths.kt index 139f74af206..1b7656ef343 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/checkers/ThirdPartyAnnotationPaths.kt @@ -16,13 +16,5 @@ package org.jetbrains.kotlin.checkers -import org.jetbrains.kotlin.config.CompilerConfiguration -import org.jetbrains.kotlin.config.JVMConfigurationKeys - -abstract class AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest : - AbstractForeignAnnotationsNoAnnotationInClasspathTest() { - override fun updateConfiguration(configuration: CompilerConfiguration) { - super.updateConfiguration(configuration) - configuration.put(JVMConfigurationKeys.USE_PSI_CLASS_FILES_READING, true) - } -} +const val FOREIGN_ANNOTATIONS_SOURCES_PATH = "third-party/annotations" +const val FOREIGN_JDK8_ANNOTATIONS_SOURCES_PATH = "third-party/jdk8-annotations" diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java b/compiler/tests-common/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java index b3a317824a6..3e04797b1a8 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/cli/AbstractCliTest.java @@ -24,7 +24,7 @@ import kotlin.io.FilesKt; import kotlin.io.path.PathsKt; import kotlin.text.Charsets; import org.jetbrains.annotations.NotNull; -import org.jetbrains.kotlin.checkers.AbstractForeignAnnotationsTestKt; +import org.jetbrains.kotlin.checkers.ThirdPartyAnnotationPathsKt; import org.jetbrains.kotlin.cli.common.CLITool; import org.jetbrains.kotlin.cli.common.ExitCode; import org.jetbrains.kotlin.cli.common.Usage; @@ -261,7 +261,7 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir { .replace(TESTDATA_DIR, testDataDir) .replace( "$FOREIGN_ANNOTATIONS_DIR$", - new File(AbstractForeignAnnotationsTestKt.FOREIGN_ANNOTATIONS_SOURCES_PATH).getPath() + new File(ThirdPartyAnnotationPathsKt.FOREIGN_ANNOTATIONS_SOURCES_PATH).getPath() ).replace( "$JDK_15$", KtTestUtil.getJdk15Home().getPath() diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/jvm/compiler/LoadDescriptorUtil.java b/compiler/tests-common/tests/org/jetbrains/kotlin/jvm/compiler/LoadDescriptorUtil.java index 96097e5d21b..62b3f6b1dcb 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/jvm/compiler/LoadDescriptorUtil.java +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/jvm/compiler/LoadDescriptorUtil.java @@ -53,7 +53,7 @@ import java.util.*; import java.util.function.Consumer; import java.util.stream.Collectors; -import static org.jetbrains.kotlin.checkers.AbstractForeignAnnotationsTestKt.FOREIGN_JDK8_ANNOTATIONS_SOURCES_PATH; +import static org.jetbrains.kotlin.checkers.ThirdPartyAnnotationPathsKt.FOREIGN_JDK8_ANNOTATIONS_SOURCES_PATH; public class LoadDescriptorUtil { @NotNull diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt index 5d4343d3f20..3dc993713a4 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt @@ -10,7 +10,6 @@ import org.jetbrains.kotlin.cfg.AbstractControlFlowTest import org.jetbrains.kotlin.cfg.AbstractDataFlowTest import org.jetbrains.kotlin.cfg.AbstractPseudoValueTest import org.jetbrains.kotlin.checkers.* -import org.jetbrains.kotlin.checkers.javac.* import org.jetbrains.kotlin.cli.AbstractCliTest import org.jetbrains.kotlin.codegen.* import org.jetbrains.kotlin.codegen.debugInformation.AbstractIrLocalVariableTest @@ -73,22 +72,6 @@ fun generateJUnit3CompilerTests(args: Array) { model("multiplatform", extension = null, recursive = true, excludeParentDirs = true) } - testClass { - model("foreignAnnotations/tests") - } - - testClass { - model("foreignAnnotations/tests") - } - - testClass { - model("foreignAnnotations/tests") - } - - testClass { - model("foreignAnnotations/tests") - } - testClass { model("resolve", extension = "resolve") } diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt index edf1353435e..aa9bad515eb 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt @@ -38,6 +38,21 @@ fun generateJUnit5CompilerTests(args: Array) { testClass { model("diagnostics/nativeTests") } + + testClass { + model("foreignAnnotations/tests") + model("foreignAnnotations/java8Tests", excludeDirs = listOf("jspecify", "typeEnhancementOnCompiledJava")) + } + + testClass { + model("foreignAnnotations/tests") + model("foreignAnnotations/java8Tests", excludeDirs = listOf("jspecify", "typeEnhancementOnCompiledJava")) + } + + testClass { + model("foreignAnnotations/tests") + model("foreignAnnotations/java8Tests", excludeDirs = listOf("jspecify", "typeEnhancementOnCompiledJava")) + } } // ---------------------------------------------- FIR tests ---------------------------------------------- diff --git a/compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java deleted file mode 100644 index 16dd45aa7ac..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.checkers; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotations/tests") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTests() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("androidRecently.kt") - public void testAndroidRecently() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidRecently.kt"); - } - - @TestMetadata("androidSdk.kt") - public void testAndroidSdk() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidSdk.kt"); - } - - @TestMetadata("android_support.kt") - public void testAndroid_support() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); - } - - @TestMetadata("androidx.kt") - public void testAndroidx() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); - } - - @TestMetadata("aosp.kt") - public void testAosp() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); - } - - @TestMetadata("checkerFramework.kt") - public void testCheckerFramework() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); - } - - @TestMetadata("eclipse.kt") - public void testEclipse() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); - } - - @TestMetadata("findBugsSimple.kt") - public void testFindBugsSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); - } - - @TestMetadata("irrelevantQualifierNicknames.kt") - public void testIrrelevantQualifierNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); - } - - @TestMetadata("lombokSimple.kt") - public void testLombokSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); - } - - @TestMetadata("rxjava.kt") - public void testRxjava() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/rxjava.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("nonNullNever.kt") - public void testNonNullNever() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); - } - - @TestMetadata("nullabilityNicknames.kt") - public void testNullabilityNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); - } - - @TestMetadata("strange.kt") - public void testStrange() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Ignore extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInIgnore() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInNullabilityWarnings() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("elvis.kt") - public void testElvis() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); - } - - @TestMetadata("localInference.kt") - public void testLocalInference() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); - } - - @TestMetadata("nullabilityGenerics.kt") - public void testNullabilityGenerics() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); - } - - @TestMetadata("nullabilityNicknames.kt") - public void testNullabilityNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); - } - - @TestMetadata("safeCalls.kt") - public void testSafeCalls() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); - } - - @TestMetadata("strange.kt") - public void testStrange() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FromPlatformTypes extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInFromPlatformTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("arithmetic.kt") - public void testArithmetic() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); - } - - @TestMetadata("array.kt") - public void testArray() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); - } - - @TestMetadata("assignToVar.kt") - public void testAssignToVar() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); - } - - @TestMetadata("conditions.kt") - public void testConditions() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); - } - - @TestMetadata("dataFlowInfo.kt") - public void testDataFlowInfo() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); - } - - @TestMetadata("defaultParameters.kt") - public void testDefaultParameters() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); - } - - @TestMetadata("delegatedProperties.kt") - public void testDelegatedProperties() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); - } - - @TestMetadata("delegation.kt") - public void testDelegation() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); - } - - @TestMetadata("derefenceExtension.kt") - public void testDerefenceExtension() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); - } - - @TestMetadata("derefenceMember.kt") - public void testDerefenceMember() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); - } - - @TestMetadata("expectedType.kt") - public void testExpectedType() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); - } - - @TestMetadata("for.kt") - public void testFor() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); - } - - @TestMetadata("functionArguments.kt") - public void testFunctionArguments() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); - } - - @TestMetadata("invoke.kt") - public void testInvoke() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); - } - - @TestMetadata("kt6829.kt") - public void testKt6829() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); - } - - @TestMetadata("multiDeclaration.kt") - public void testMultiDeclaration() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); - } - - @TestMetadata("passToJava.kt") - public void testPassToJava() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); - } - - @TestMetadata("primitiveArray.kt") - public void testPrimitiveArray() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); - } - - @TestMetadata("throw.kt") - public void testThrow() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); - } - - @TestMetadata("uselessElvisRightIsNull.kt") - public void testUselessElvisRightIsNull() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("equalsOnNonNull.kt") - public void testEqualsOnNonNull() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); - } - - @TestMetadata("fieldsAreNullable.kt") - public void testFieldsAreNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); - } - - @TestMetadata("nullabilityFromOverridden.kt") - public void testNullabilityFromOverridden() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); - } - - @TestMetadata("overridingDefaultQualifier.kt") - public void testOverridingDefaultQualifier() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - } - - @TestMetadata("parametersAreNonnullByDefaultPackage.kt") - public void testParametersAreNonnullByDefaultPackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - } - - @TestMetadata("springNullable.kt") - public void testSpringNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); - } - - @TestMetadata("springNullablePackage.kt") - public void testSpringNullablePackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("fieldsAreNullable.kt") - public void testFieldsAreNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); - } - - @TestMetadata("forceFlexibility.kt") - public void testForceFlexibility() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); - } - - @TestMetadata("forceFlexibleOverOverrides.kt") - public void testForceFlexibleOverOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); - } - - @TestMetadata("nullabilityFromOverridden.kt") - public void testNullabilityFromOverridden() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); - } - - @TestMetadata("overridingDefaultQualifier.kt") - public void testOverridingDefaultQualifier() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - } - - @TestMetadata("parametersAreNonnullByDefaultPackage.kt") - public void testParametersAreNonnullByDefaultPackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - } - - @TestMetadata("springNullable.kt") - public void testSpringNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); - } - - @TestMetadata("springNullablePackage.kt") - public void testSpringNullablePackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Migration extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInMigration() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("customMigration.kt") - public void testCustomMigration() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); - } - - @TestMetadata("globalIgnore.kt") - public void testGlobalIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); - } - - @TestMetadata("globalWarningMigrationIgnore.kt") - public void testGlobalWarningMigrationIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); - } - - @TestMetadata("migrationError.kt") - public void testMigrationError() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); - } - - @TestMetadata("migrationIgnore.kt") - public void testMigrationIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); - } - - @TestMetadata("migrationWarning.kt") - public void testMigrationWarning() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); - } - - @TestMetadata("overrideConflicts.kt") - public void testOverrideConflicts() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); - } - - @TestMetadata("specialCollision.kt") - public void testSpecialCollision() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); - } - - @TestMetadata("stateRefinement.kt") - public void testStateRefinement() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("defaultAndNicknameMigrationPolicy.kt") - public void testDefaultAndNicknameMigrationPolicy() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); - } - } -} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java deleted file mode 100644 index d104f7a21e4..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.checkers; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotations/tests") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class ForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTests() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("androidRecently.kt") - public void testAndroidRecently() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidRecently.kt"); - } - - @TestMetadata("androidSdk.kt") - public void testAndroidSdk() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidSdk.kt"); - } - - @TestMetadata("android_support.kt") - public void testAndroid_support() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); - } - - @TestMetadata("androidx.kt") - public void testAndroidx() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); - } - - @TestMetadata("aosp.kt") - public void testAosp() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); - } - - @TestMetadata("checkerFramework.kt") - public void testCheckerFramework() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); - } - - @TestMetadata("eclipse.kt") - public void testEclipse() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); - } - - @TestMetadata("findBugsSimple.kt") - public void testFindBugsSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); - } - - @TestMetadata("irrelevantQualifierNicknames.kt") - public void testIrrelevantQualifierNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); - } - - @TestMetadata("lombokSimple.kt") - public void testLombokSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); - } - - @TestMetadata("rxjava.kt") - public void testRxjava() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/rxjava.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("nonNullNever.kt") - public void testNonNullNever() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); - } - - @TestMetadata("nullabilityNicknames.kt") - public void testNullabilityNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); - } - - @TestMetadata("strange.kt") - public void testStrange() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Ignore extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInIgnore() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInNullabilityWarnings() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("elvis.kt") - public void testElvis() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); - } - - @TestMetadata("localInference.kt") - public void testLocalInference() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); - } - - @TestMetadata("nullabilityGenerics.kt") - public void testNullabilityGenerics() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); - } - - @TestMetadata("nullabilityNicknames.kt") - public void testNullabilityNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); - } - - @TestMetadata("safeCalls.kt") - public void testSafeCalls() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); - } - - @TestMetadata("strange.kt") - public void testStrange() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FromPlatformTypes extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInFromPlatformTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("arithmetic.kt") - public void testArithmetic() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); - } - - @TestMetadata("array.kt") - public void testArray() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); - } - - @TestMetadata("assignToVar.kt") - public void testAssignToVar() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); - } - - @TestMetadata("conditions.kt") - public void testConditions() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); - } - - @TestMetadata("dataFlowInfo.kt") - public void testDataFlowInfo() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); - } - - @TestMetadata("defaultParameters.kt") - public void testDefaultParameters() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); - } - - @TestMetadata("delegatedProperties.kt") - public void testDelegatedProperties() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); - } - - @TestMetadata("delegation.kt") - public void testDelegation() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); - } - - @TestMetadata("derefenceExtension.kt") - public void testDerefenceExtension() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); - } - - @TestMetadata("derefenceMember.kt") - public void testDerefenceMember() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); - } - - @TestMetadata("expectedType.kt") - public void testExpectedType() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); - } - - @TestMetadata("for.kt") - public void testFor() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); - } - - @TestMetadata("functionArguments.kt") - public void testFunctionArguments() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); - } - - @TestMetadata("invoke.kt") - public void testInvoke() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); - } - - @TestMetadata("kt6829.kt") - public void testKt6829() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); - } - - @TestMetadata("multiDeclaration.kt") - public void testMultiDeclaration() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); - } - - @TestMetadata("passToJava.kt") - public void testPassToJava() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); - } - - @TestMetadata("primitiveArray.kt") - public void testPrimitiveArray() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); - } - - @TestMetadata("throw.kt") - public void testThrow() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); - } - - @TestMetadata("uselessElvisRightIsNull.kt") - public void testUselessElvisRightIsNull() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("equalsOnNonNull.kt") - public void testEqualsOnNonNull() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); - } - - @TestMetadata("fieldsAreNullable.kt") - public void testFieldsAreNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); - } - - @TestMetadata("nullabilityFromOverridden.kt") - public void testNullabilityFromOverridden() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); - } - - @TestMetadata("overridingDefaultQualifier.kt") - public void testOverridingDefaultQualifier() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - } - - @TestMetadata("parametersAreNonnullByDefaultPackage.kt") - public void testParametersAreNonnullByDefaultPackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - } - - @TestMetadata("springNullable.kt") - public void testSpringNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); - } - - @TestMetadata("springNullablePackage.kt") - public void testSpringNullablePackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("fieldsAreNullable.kt") - public void testFieldsAreNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); - } - - @TestMetadata("forceFlexibility.kt") - public void testForceFlexibility() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); - } - - @TestMetadata("forceFlexibleOverOverrides.kt") - public void testForceFlexibleOverOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); - } - - @TestMetadata("nullabilityFromOverridden.kt") - public void testNullabilityFromOverridden() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); - } - - @TestMetadata("overridingDefaultQualifier.kt") - public void testOverridingDefaultQualifier() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - } - - @TestMetadata("parametersAreNonnullByDefaultPackage.kt") - public void testParametersAreNonnullByDefaultPackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - } - - @TestMetadata("springNullable.kt") - public void testSpringNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); - } - - @TestMetadata("springNullablePackage.kt") - public void testSpringNullablePackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Migration extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInMigration() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("customMigration.kt") - public void testCustomMigration() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); - } - - @TestMetadata("globalIgnore.kt") - public void testGlobalIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); - } - - @TestMetadata("globalWarningMigrationIgnore.kt") - public void testGlobalWarningMigrationIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); - } - - @TestMetadata("migrationError.kt") - public void testMigrationError() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); - } - - @TestMetadata("migrationIgnore.kt") - public void testMigrationIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); - } - - @TestMetadata("migrationWarning.kt") - public void testMigrationWarning() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); - } - - @TestMetadata("overrideConflicts.kt") - public void testOverrideConflicts() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); - } - - @TestMetadata("specialCollision.kt") - public void testSpecialCollision() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); - } - - @TestMetadata("stateRefinement.kt") - public void testStateRefinement() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("defaultAndNicknameMigrationPolicy.kt") - public void testDefaultAndNicknameMigrationPolicy() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); - } - } -} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsTestGenerated.java deleted file mode 100644 index ab7127e5112..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/checkers/ForeignAnnotationsTestGenerated.java +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.checkers; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotations/tests") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTests() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("androidRecently.kt") - public void testAndroidRecently() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidRecently.kt"); - } - - @TestMetadata("androidSdk.kt") - public void testAndroidSdk() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidSdk.kt"); - } - - @TestMetadata("android_support.kt") - public void testAndroid_support() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); - } - - @TestMetadata("androidx.kt") - public void testAndroidx() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); - } - - @TestMetadata("aosp.kt") - public void testAosp() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); - } - - @TestMetadata("checkerFramework.kt") - public void testCheckerFramework() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); - } - - @TestMetadata("eclipse.kt") - public void testEclipse() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); - } - - @TestMetadata("findBugsSimple.kt") - public void testFindBugsSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); - } - - @TestMetadata("irrelevantQualifierNicknames.kt") - public void testIrrelevantQualifierNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); - } - - @TestMetadata("lombokSimple.kt") - public void testLombokSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); - } - - @TestMetadata("rxjava.kt") - public void testRxjava() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/rxjava.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305 extends AbstractForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("nonNullNever.kt") - public void testNonNullNever() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); - } - - @TestMetadata("nullabilityNicknames.kt") - public void testNullabilityNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); - } - - @TestMetadata("strange.kt") - public void testStrange() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Ignore extends AbstractForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInIgnore() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NullabilityWarnings extends AbstractForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInNullabilityWarnings() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("elvis.kt") - public void testElvis() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); - } - - @TestMetadata("localInference.kt") - public void testLocalInference() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); - } - - @TestMetadata("nullabilityGenerics.kt") - public void testNullabilityGenerics() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); - } - - @TestMetadata("nullabilityNicknames.kt") - public void testNullabilityNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); - } - - @TestMetadata("safeCalls.kt") - public void testSafeCalls() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); - } - - @TestMetadata("strange.kt") - public void testStrange() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FromPlatformTypes extends AbstractForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInFromPlatformTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("arithmetic.kt") - public void testArithmetic() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); - } - - @TestMetadata("array.kt") - public void testArray() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); - } - - @TestMetadata("assignToVar.kt") - public void testAssignToVar() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); - } - - @TestMetadata("conditions.kt") - public void testConditions() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); - } - - @TestMetadata("dataFlowInfo.kt") - public void testDataFlowInfo() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); - } - - @TestMetadata("defaultParameters.kt") - public void testDefaultParameters() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); - } - - @TestMetadata("delegatedProperties.kt") - public void testDelegatedProperties() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); - } - - @TestMetadata("delegation.kt") - public void testDelegation() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); - } - - @TestMetadata("derefenceExtension.kt") - public void testDerefenceExtension() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); - } - - @TestMetadata("derefenceMember.kt") - public void testDerefenceMember() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); - } - - @TestMetadata("expectedType.kt") - public void testExpectedType() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); - } - - @TestMetadata("for.kt") - public void testFor() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); - } - - @TestMetadata("functionArguments.kt") - public void testFunctionArguments() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); - } - - @TestMetadata("invoke.kt") - public void testInvoke() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); - } - - @TestMetadata("kt6829.kt") - public void testKt6829() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); - } - - @TestMetadata("multiDeclaration.kt") - public void testMultiDeclaration() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); - } - - @TestMetadata("passToJava.kt") - public void testPassToJava() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); - } - - @TestMetadata("primitiveArray.kt") - public void testPrimitiveArray() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); - } - - @TestMetadata("throw.kt") - public void testThrow() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); - } - - @TestMetadata("uselessElvisRightIsNull.kt") - public void testUselessElvisRightIsNull() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("equalsOnNonNull.kt") - public void testEqualsOnNonNull() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); - } - - @TestMetadata("fieldsAreNullable.kt") - public void testFieldsAreNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); - } - - @TestMetadata("nullabilityFromOverridden.kt") - public void testNullabilityFromOverridden() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); - } - - @TestMetadata("overridingDefaultQualifier.kt") - public void testOverridingDefaultQualifier() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - } - - @TestMetadata("parametersAreNonnullByDefaultPackage.kt") - public void testParametersAreNonnullByDefaultPackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - } - - @TestMetadata("springNullable.kt") - public void testSpringNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); - } - - @TestMetadata("springNullablePackage.kt") - public void testSpringNullablePackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("fieldsAreNullable.kt") - public void testFieldsAreNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); - } - - @TestMetadata("forceFlexibility.kt") - public void testForceFlexibility() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); - } - - @TestMetadata("forceFlexibleOverOverrides.kt") - public void testForceFlexibleOverOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); - } - - @TestMetadata("nullabilityFromOverridden.kt") - public void testNullabilityFromOverridden() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); - } - - @TestMetadata("overridingDefaultQualifier.kt") - public void testOverridingDefaultQualifier() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - } - - @TestMetadata("parametersAreNonnullByDefaultPackage.kt") - public void testParametersAreNonnullByDefaultPackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - } - - @TestMetadata("springNullable.kt") - public void testSpringNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); - } - - @TestMetadata("springNullablePackage.kt") - public void testSpringNullablePackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Migration extends AbstractForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInMigration() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("customMigration.kt") - public void testCustomMigration() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); - } - - @TestMetadata("globalIgnore.kt") - public void testGlobalIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); - } - - @TestMetadata("globalWarningMigrationIgnore.kt") - public void testGlobalWarningMigrationIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); - } - - @TestMetadata("migrationError.kt") - public void testMigrationError() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); - } - - @TestMetadata("migrationIgnore.kt") - public void testMigrationIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); - } - - @TestMetadata("migrationWarning.kt") - public void testMigrationWarning() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); - } - - @TestMetadata("overrideConflicts.kt") - public void testOverrideConflicts() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); - } - - @TestMetadata("specialCollision.kt") - public void testSpecialCollision() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); - } - - @TestMetadata("stateRefinement.kt") - public void testStateRefinement() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("defaultAndNicknameMigrationPolicy.kt") - public void testDefaultAndNicknameMigrationPolicy() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); - } - } -} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/checkers/javac/JavacForeignAnnotationsTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/checkers/javac/JavacForeignAnnotationsTestGenerated.java deleted file mode 100644 index d71e182c849..00000000000 --- a/compiler/tests-gen/org/jetbrains/kotlin/checkers/javac/JavacForeignAnnotationsTestGenerated.java +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.checkers.javac; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotations/tests") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class JavacForeignAnnotationsTestGenerated extends AbstractJavacForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTests() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("androidRecently.kt") - public void testAndroidRecently() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidRecently.kt"); - } - - @TestMetadata("androidSdk.kt") - public void testAndroidSdk() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidSdk.kt"); - } - - @TestMetadata("android_support.kt") - public void testAndroid_support() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); - } - - @TestMetadata("androidx.kt") - public void testAndroidx() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); - } - - @TestMetadata("aosp.kt") - public void testAosp() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); - } - - @TestMetadata("checkerFramework.kt") - public void testCheckerFramework() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); - } - - @TestMetadata("eclipse.kt") - public void testEclipse() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); - } - - @TestMetadata("findBugsSimple.kt") - public void testFindBugsSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); - } - - @TestMetadata("irrelevantQualifierNicknames.kt") - public void testIrrelevantQualifierNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); - } - - @TestMetadata("lombokSimple.kt") - public void testLombokSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); - } - - @TestMetadata("rxjava.kt") - public void testRxjava() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/rxjava.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305 extends AbstractJavacForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("nonNullNever.kt") - public void testNonNullNever() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); - } - - @TestMetadata("nullabilityNicknames.kt") - public void testNullabilityNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); - } - - @TestMetadata("strange.kt") - public void testStrange() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Ignore extends AbstractJavacForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInIgnore() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class NullabilityWarnings extends AbstractJavacForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInNullabilityWarnings() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("elvis.kt") - public void testElvis() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); - } - - @TestMetadata("localInference.kt") - public void testLocalInference() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); - } - - @TestMetadata("nullabilityGenerics.kt") - public void testNullabilityGenerics() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); - } - - @TestMetadata("nullabilityNicknames.kt") - public void testNullabilityNicknames() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); - } - - @TestMetadata("safeCalls.kt") - public void testSafeCalls() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); - } - - @TestMetadata("strange.kt") - public void testStrange() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class FromPlatformTypes extends AbstractJavacForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInFromPlatformTypes() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("arithmetic.kt") - public void testArithmetic() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); - } - - @TestMetadata("array.kt") - public void testArray() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); - } - - @TestMetadata("assignToVar.kt") - public void testAssignToVar() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); - } - - @TestMetadata("conditions.kt") - public void testConditions() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); - } - - @TestMetadata("dataFlowInfo.kt") - public void testDataFlowInfo() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); - } - - @TestMetadata("defaultParameters.kt") - public void testDefaultParameters() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); - } - - @TestMetadata("delegatedProperties.kt") - public void testDelegatedProperties() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); - } - - @TestMetadata("delegation.kt") - public void testDelegation() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); - } - - @TestMetadata("derefenceExtension.kt") - public void testDerefenceExtension() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); - } - - @TestMetadata("derefenceMember.kt") - public void testDerefenceMember() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); - } - - @TestMetadata("expectedType.kt") - public void testExpectedType() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); - } - - @TestMetadata("for.kt") - public void testFor() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); - } - - @TestMetadata("functionArguments.kt") - public void testFunctionArguments() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); - } - - @TestMetadata("invoke.kt") - public void testInvoke() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); - } - - @TestMetadata("kt6829.kt") - public void testKt6829() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); - } - - @TestMetadata("multiDeclaration.kt") - public void testMultiDeclaration() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); - } - - @TestMetadata("passToJava.kt") - public void testPassToJava() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); - } - - @TestMetadata("primitiveArray.kt") - public void testPrimitiveArray() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); - } - - @TestMetadata("throw.kt") - public void testThrow() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); - } - - @TestMetadata("uselessElvisRightIsNull.kt") - public void testUselessElvisRightIsNull() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractJavacForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("equalsOnNonNull.kt") - public void testEqualsOnNonNull() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); - } - - @TestMetadata("fieldsAreNullable.kt") - public void testFieldsAreNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); - } - - @TestMetadata("nullabilityFromOverridden.kt") - public void testNullabilityFromOverridden() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); - } - - @TestMetadata("overridingDefaultQualifier.kt") - public void testOverridingDefaultQualifier() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - } - - @TestMetadata("parametersAreNonnullByDefaultPackage.kt") - public void testParametersAreNonnullByDefaultPackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - } - - @TestMetadata("springNullable.kt") - public void testSpringNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); - } - - @TestMetadata("springNullablePackage.kt") - public void testSpringNullablePackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractJavacForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("fieldsAreNullable.kt") - public void testFieldsAreNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); - } - - @TestMetadata("forceFlexibility.kt") - public void testForceFlexibility() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); - } - - @TestMetadata("forceFlexibleOverOverrides.kt") - public void testForceFlexibleOverOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); - } - - @TestMetadata("nullabilityFromOverridden.kt") - public void testNullabilityFromOverridden() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); - } - - @TestMetadata("overridingDefaultQualifier.kt") - public void testOverridingDefaultQualifier() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); - } - - @TestMetadata("parametersAreNonnullByDefault.kt") - public void testParametersAreNonnullByDefault() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - } - - @TestMetadata("parametersAreNonnullByDefaultPackage.kt") - public void testParametersAreNonnullByDefaultPackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - } - - @TestMetadata("springNullable.kt") - public void testSpringNullable() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); - } - - @TestMetadata("springNullablePackage.kt") - public void testSpringNullablePackage() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305NullabilityWarnings extends AbstractJavacForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Migration extends AbstractJavacForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInMigration() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("customMigration.kt") - public void testCustomMigration() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); - } - - @TestMetadata("globalIgnore.kt") - public void testGlobalIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); - } - - @TestMetadata("globalWarningMigrationIgnore.kt") - public void testGlobalWarningMigrationIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); - } - - @TestMetadata("migrationError.kt") - public void testMigrationError() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); - } - - @TestMetadata("migrationIgnore.kt") - public void testMigrationIgnore() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); - } - - @TestMetadata("migrationWarning.kt") - public void testMigrationWarning() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); - } - - @TestMetadata("overrideConflicts.kt") - public void testOverrideConflicts() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); - } - - @TestMetadata("specialCollision.kt") - public void testSpecialCollision() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); - } - - @TestMetadata("stateRefinement.kt") - public void testStateRefinement() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); - } - } - } - - @TestMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeQualifierDefault extends AbstractJavacForeignAnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeQualifierDefault() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("defaultAndNicknameMigrationPolicy.kt") - public void testDefaultAndNicknameMigrationPolicy() throws Exception { - runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); - } - } -} diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsCompiledJavaDiagnosticTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsCompiledJavaDiagnosticTestGenerated.java index 4116daf3dd9..71bec715cd4 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsCompiledJavaDiagnosticTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsCompiledJavaDiagnosticTestGenerated.java @@ -17,7 +17,7 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava") +@TestMetadata("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ForeignAnnotationsCompiledJavaDiagnosticTestGenerated extends AbstractForeignAnnotationsCompiledJavaDiagnosticTest { @@ -26,36 +26,36 @@ public class ForeignAnnotationsCompiledJavaDiagnosticTestGenerated extends Abstr } public void testAllFilesPresentInTypeEnhancementOnCompiledJava() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("ClassTypeParameterBound.kt") public void testClassTypeParameterBound() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBound.kt"); } @TestMetadata("ClassTypeParameterBoundWithWarnings.kt") public void testClassTypeParameterBoundWithWarnings() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ClassTypeParameterBoundWithWarnings.kt"); } @TestMetadata("ReturnType.kt") public void testReturnType() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnType.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnType.kt"); } @TestMetadata("ReturnTypeWithWarnings.kt") public void testReturnTypeWithWarnings() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ReturnTypeWithWarnings.kt"); } @TestMetadata("ValueParameter.kt") public void testValueParameter() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameter.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameter.kt"); } @TestMetadata("ValueParameterWithWarnings.kt") public void testValueParameterWithWarnings() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava/ValueParameterWithWarnings.kt"); } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated.java deleted file mode 100644 index 75fd2eb2ba1..00000000000 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.checkers; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTests() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify", "typeEnhancementOnCompiledJava"); - } - - @TestMetadata("checkerFramework.kt") - public void testCheckerFramework() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); - } - - @TestMetadata("eclipse.kt") - public void testEclipse() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); - } - - @TestMetadata("typeUseOnObject.kt") - public void testTypeUseOnObject() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305 extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("defaultAnnotationAppliedToType.kt") - public void testDefaultAnnotationAppliedToType() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); - } - - @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") - public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); - } - - @TestMetadata("springNullableWithTypeUse.kt") - public void testSpringNullableWithTypeUse() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); - } - - @TestMetadata("typeArguments.kt") - public void testTypeArguments() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); - } - - @TestMetadata("typeUseVsMethodConflict.kt") - public void testTypeUseVsMethodConflict() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeEnhancement extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeEnhancement() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("annotatedTypeArguments.kt") - public void testAnnotatedTypeArguments() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); - } - - @TestMetadata("methodWithTypeParameter.kt") - public void testMethodWithTypeParameter() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); - } - - @TestMetadata("notNullVarargsOverrides.kt") - public void testNotNullVarargsOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); - } - - @TestMetadata("nullableVarargsOverrides.kt") - public void testNullableVarargsOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); - } - - @TestMetadata("returnTypeDifferentConstructor.kt") - public void testReturnTypeDifferentConstructor() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); - } - - @TestMetadata("returnTypeOverrideInKotlin.kt") - public void testReturnTypeOverrideInKotlin() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt"); - } - } -} diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java deleted file mode 100644 index ae58e4e1528..00000000000 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.checkers; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class ForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTestGenerated extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTests() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify", "typeEnhancementOnCompiledJava"); - } - - @TestMetadata("checkerFramework.kt") - public void testCheckerFramework() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); - } - - @TestMetadata("eclipse.kt") - public void testEclipse() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); - } - - @TestMetadata("typeUseOnObject.kt") - public void testTypeUseOnObject() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305 extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("defaultAnnotationAppliedToType.kt") - public void testDefaultAnnotationAppliedToType() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); - } - - @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") - public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); - } - - @TestMetadata("springNullableWithTypeUse.kt") - public void testSpringNullableWithTypeUse() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); - } - - @TestMetadata("typeArguments.kt") - public void testTypeArguments() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); - } - - @TestMetadata("typeUseVsMethodConflict.kt") - public void testTypeUseVsMethodConflict() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeEnhancement extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithPsiClassReadingTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeEnhancement() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("annotatedTypeArguments.kt") - public void testAnnotatedTypeArguments() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); - } - - @TestMetadata("methodWithTypeParameter.kt") - public void testMethodWithTypeParameter() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); - } - - @TestMetadata("notNullVarargsOverrides.kt") - public void testNotNullVarargsOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); - } - - @TestMetadata("nullableVarargsOverrides.kt") - public void testNullableVarargsOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); - } - - @TestMetadata("returnTypeDifferentConstructor.kt") - public void testReturnTypeDifferentConstructor() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); - } - - @TestMetadata("returnTypeOverrideInKotlin.kt") - public void testReturnTypeOverrideInKotlin() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt"); - } - } -} diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsTestGenerated.java deleted file mode 100644 index 4eb268efc01..00000000000 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsTestGenerated.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.checkers; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class ForeignJava8AnnotationsTestGenerated extends AbstractForeignJava8AnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTests() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify", "typeEnhancementOnCompiledJava"); - } - - @TestMetadata("checkerFramework.kt") - public void testCheckerFramework() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); - } - - @TestMetadata("eclipse.kt") - public void testEclipse() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); - } - - @TestMetadata("typeUseOnObject.kt") - public void testTypeUseOnObject() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305 extends AbstractForeignJava8AnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("defaultAnnotationAppliedToType.kt") - public void testDefaultAnnotationAppliedToType() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); - } - - @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") - public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); - } - - @TestMetadata("springNullableWithTypeUse.kt") - public void testSpringNullableWithTypeUse() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); - } - - @TestMetadata("typeArguments.kt") - public void testTypeArguments() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); - } - - @TestMetadata("typeUseVsMethodConflict.kt") - public void testTypeUseVsMethodConflict() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeEnhancement extends AbstractForeignJava8AnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeEnhancement() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("annotatedTypeArguments.kt") - public void testAnnotatedTypeArguments() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); - } - - @TestMetadata("methodWithTypeParameter.kt") - public void testMethodWithTypeParameter() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); - } - - @TestMetadata("notNullVarargsOverrides.kt") - public void testNotNullVarargsOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); - } - - @TestMetadata("nullableVarargsOverrides.kt") - public void testNullableVarargsOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); - } - - @TestMetadata("returnTypeDifferentConstructor.kt") - public void testReturnTypeDifferentConstructor() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); - } - - @TestMetadata("returnTypeOverrideInKotlin.kt") - public void testReturnTypeOverrideInKotlin() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt"); - } - } -} diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/JspecifyAnnotationsTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/JspecifyAnnotationsTestGenerated.java index dc862175c93..b9dfd07191f 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/JspecifyAnnotationsTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/JspecifyAnnotationsTestGenerated.java @@ -17,7 +17,7 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin") +@TestMetadata("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JspecifyAnnotationsTestGenerated extends AbstractJspecifyAnnotationsTest { @@ -26,10 +26,10 @@ public class JspecifyAnnotationsTestGenerated extends AbstractJspecifyAnnotation } public void testAllFilesPresentInKotlin() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin"), Pattern.compile("^(.+)\\.kt$"), null, true); } - @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode") + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StrictMode extends AbstractJspecifyAnnotationsTest { @@ -38,61 +38,61 @@ public class JspecifyAnnotationsTestGenerated extends AbstractJspecifyAnnotation } public void testAllFilesPresentInStrictMode() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("AnnotatedBoundsOfWildcard.kt") public void testAnnotatedBoundsOfWildcard() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/AnnotatedBoundsOfWildcard.kt"); } @TestMetadata("Defaults.kt") public void testDefaults() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/Defaults.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/Defaults.kt"); } @TestMetadata("IgnoreAnnotations.kt") public void testIgnoreAnnotations() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/IgnoreAnnotations.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/IgnoreAnnotations.kt"); } @TestMetadata("NonPlatformTypeParameter.kt") public void testNonPlatformTypeParameter() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/NonPlatformTypeParameter.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/NonPlatformTypeParameter.kt"); } @TestMetadata("NullnessUnspecifiedTypeParameter.kt") public void testNullnessUnspecifiedTypeParameter() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/NullnessUnspecifiedTypeParameter.kt"); } @TestMetadata("SelfType.kt") public void testSelfType() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/SelfType.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/SelfType.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/Simple.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/Simple.kt"); } @TestMetadata("TypeArgumentsFromParameterBounds.kt") public void testTypeArgumentsFromParameterBounds() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/TypeArgumentsFromParameterBounds.kt"); } @TestMetadata("TypeParameterBounds.kt") public void testTypeParameterBounds() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/TypeParameterBounds.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/TypeParameterBounds.kt"); } @TestMetadata("WildcardsWithDefault.kt") public void testWildcardsWithDefault() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/strictMode/WildcardsWithDefault.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/strictMode/WildcardsWithDefault.kt"); } } - @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode") + @TestMetadata("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WarnMode extends AbstractJspecifyAnnotationsTest { @@ -101,57 +101,57 @@ public class JspecifyAnnotationsTestGenerated extends AbstractJspecifyAnnotation } public void testAllFilesPresentInWarnMode() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode"), Pattern.compile("^(.+)\\.kt$"), null, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("AnnotatedBoundsOfWildcard.kt") public void testAnnotatedBoundsOfWildcard() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/AnnotatedBoundsOfWildcard.kt"); } @TestMetadata("Defaults.kt") public void testDefaults() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/Defaults.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/Defaults.kt"); } @TestMetadata("IgnoreAnnotations.kt") public void testIgnoreAnnotations() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/IgnoreAnnotations.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/IgnoreAnnotations.kt"); } @TestMetadata("NonPlatformTypeParameter.kt") public void testNonPlatformTypeParameter() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/NonPlatformTypeParameter.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/NonPlatformTypeParameter.kt"); } @TestMetadata("NullnessUnspecifiedTypeParameter.kt") public void testNullnessUnspecifiedTypeParameter() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/NullnessUnspecifiedTypeParameter.kt"); } @TestMetadata("SelfType.kt") public void testSelfType() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/SelfType.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/SelfType.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/Simple.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/Simple.kt"); } @TestMetadata("TypeArgumentsFromParameterBounds.kt") public void testTypeArgumentsFromParameterBounds() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/TypeArgumentsFromParameterBounds.kt"); } @TestMetadata("TypeParameterBounds.kt") public void testTypeParameterBounds() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/TypeParameterBounds.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/TypeParameterBounds.kt"); } @TestMetadata("WildcardsWithDefault.kt") public void testWildcardsWithDefault() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jspecify/kotlin/warnMode/WildcardsWithDefault.kt"); + runTest("compiler/testData/foreignAnnotations/java8Tests/jspecify/kotlin/warnMode/WildcardsWithDefault.kt"); } } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/javac/JavacForeignJava8AnnotationsTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/javac/JavacForeignJava8AnnotationsTestGenerated.java deleted file mode 100644 index 0f3fbf48add..00000000000 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/javac/JavacForeignJava8AnnotationsTestGenerated.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.checkers.javac; - -import com.intellij.testFramework.TestDataPath; -import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; -import org.jetbrains.kotlin.test.KotlinTestUtils; -import org.jetbrains.kotlin.test.util.KtTestUtil; -import org.jetbrains.kotlin.test.TestMetadata; -import org.junit.runner.RunWith; - -import java.io.File; -import java.util.regex.Pattern; - -/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ -@SuppressWarnings("all") -@TestMetadata("compiler/testData/foreignAnnotationsJava8/tests") -@TestDataPath("$PROJECT_ROOT") -@RunWith(JUnit3RunnerWithInners.class) -public class JavacForeignJava8AnnotationsTestGenerated extends AbstractJavacForeignJava8AnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTests() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), null, true, "jspecify", "typeEnhancementOnCompiledJava"); - } - - @TestMetadata("checkerFramework.kt") - public void testCheckerFramework() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); - } - - @TestMetadata("eclipse.kt") - public void testEclipse() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); - } - - @TestMetadata("typeUseOnObject.kt") - public void testTypeUseOnObject() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt"); - } - - @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Jsr305 extends AbstractJavacForeignJava8AnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInJsr305() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("defaultAnnotationAppliedToType.kt") - public void testDefaultAnnotationAppliedToType() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); - } - - @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") - public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); - } - - @TestMetadata("springNullableWithTypeUse.kt") - public void testSpringNullableWithTypeUse() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); - } - - @TestMetadata("typeArguments.kt") - public void testTypeArguments() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); - } - - @TestMetadata("typeUseVsMethodConflict.kt") - public void testTypeUseVsMethodConflict() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); - } - } - - @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class TypeEnhancement extends AbstractJavacForeignJava8AnnotationsTest { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); - } - - public void testAllFilesPresentInTypeEnhancement() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), null, true); - } - - @TestMetadata("annotatedTypeArguments.kt") - public void testAnnotatedTypeArguments() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); - } - - @TestMetadata("methodWithTypeParameter.kt") - public void testMethodWithTypeParameter() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); - } - - @TestMetadata("notNullVarargsOverrides.kt") - public void testNotNullVarargsOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); - } - - @TestMetadata("nullableVarargsOverrides.kt") - public void testNullableVarargsOverrides() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); - } - - @TestMetadata("returnTypeDifferentConstructor.kt") - public void testReturnTypeDifferentConstructor() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); - } - - @TestMetadata("returnTypeOverrideInKotlin.kt") - public void testReturnTypeOverrideInKotlin() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); - } - - @TestMetadata("simple.kt") - public void testSimple() throws Exception { - runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt"); - } - } -} diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt index aead7323de0..0035537738c 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt @@ -17,7 +17,6 @@ package org.jetbrains.kotlin.generators.tests import org.jetbrains.kotlin.checkers.* -import org.jetbrains.kotlin.checkers.javac.AbstractJavacForeignJava8AnnotationsTest import org.jetbrains.kotlin.generators.impl.generateTestGroupSuite import org.jetbrains.kotlin.jvm.compiler.AbstractLoadJava8Test import org.jetbrains.kotlin.jvm.compiler.AbstractLoadJava8WithPsiClassReadingTest @@ -29,31 +28,12 @@ fun main(args: Array) { generateTestGroupSuite(args) { testGroup("compiler/tests-java8/tests", "compiler/testData") { - testClass { - model("foreignAnnotationsJava8/tests", excludeDirs = listOf("jspecify", "typeEnhancementOnCompiledJava")) - } - - testClass { - model("foreignAnnotationsJava8/tests", excludeDirs = listOf("jspecify", "typeEnhancementOnCompiledJava")) - } - - testClass { - model("foreignAnnotationsJava8/tests", excludeDirs = listOf("jspecify", "typeEnhancementOnCompiledJava")) - } - - testClass { - model( - "foreignAnnotationsJava8/tests", - excludeDirs = listOf("jspecify", "typeEnhancementOnCompiledJava") - ) - } - testClass { - model("foreignAnnotationsJava8/tests/jspecify/kotlin") + model("foreignAnnotations/java8Tests/jspecify/kotlin") } testClass { - model("foreignAnnotationsJava8/tests/typeEnhancementOnCompiledJava") + model("foreignAnnotations/java8Tests/typeEnhancementOnCompiledJava") } testClass {